DiigIT | IT Community
No Profile Image
Welcome Guest
New User? Register | Login
SQL
IT Tags

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;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

 

Comments

No Comments Posted for this Article.

Leave a comment

Enter the text in the image
img
Can't read?
Type the characters you see in the picture below.


Close Move