![]() |
|||
The DELETE statement
By: rekha singh | 28 Apr 2010 12:59 pm
The DELETE Statement
The DELETE statement is used to delete rows in a table.
==========================================================
SQL DELETE Syntax
DELETE FROM table_name
WHERE some_column=some_value
example
DELETE from logintable
where id="sam";
==============================================================
DELETE FROM table_name
WHERE some_column=some_value AND some_column=some_value
example
DELETE FROM Employee
WHERE LastName='maya' AND FirstName='231bk'
=====================================================
Delete All Rows
It is possible to delete all rows in a table without deleting the table.
This means that the table structure, attributes, and indexes will be intact:
DELETE FROM table_name;
|
