SQL-W3School: SQL DELETE statement

ylbtech-SQL-W3School: SQL DELETE statement

 

1. Back to top
1、

DELETE statement

DELETE statement to remove rows in a table.

grammar

DELETE FROM table name WHERE column name = value

Person:

LastName FirstName Address City
Gates Bill Xuanwumen 10 Beijing
Wilson Fred Zhongshan 23 Nanjing

Delete a row

"Fred Wilson" will be deleted:

DELETE FROM Person WHERE LastName = 'Wilson' 

result:

LastName FirstName Address City
Gates Bill Xuanwumen 10 Beijing

Delete all rows

You can delete all the rows in a table without deleted. Structure, properties, and this means that the table index is complete:

DELETE FROM table_name

or:

DELETE * FROM table_name
2、
2. Return to top
 
3. Back to top
 
4. Top
 
5. Top
1、
2、
 
6. Back to top
 
warn Author: ylbtech
Source: http://ylbtech.cnblogs.com/
This article belongs to the author and blog Park total, welcome to reprint, but without the author's consent declared by this section must be retained, and given the original connection in the apparent position of the article page, otherwise reserves the right to pursue legal responsibilities.

Guess you like

Origin www.cnblogs.com/storebook/p/11805119.html