Recipe4.12.Deleting All Records from a Table


Recipe 4.12. Deleting All Records from a Table

Problem

You want to delete all the records from a table.

Solution

Use the DELETE command to delete records from a table. For example, to delete all records from EMP:

 delete from emp 

Discussion

When using the DELETE command without a WHERE clause, you will delete all rows from the table specified.




SQL Cookbook
SQL Cookbook (Cookbooks (OReilly))
ISBN: 0596009763
EAN: 2147483647
Year: 2005
Pages: 235

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net