网络学院 w3pop社区 网络资源 IT新闻

w3pop.com :: 网络学院 :: SQL :: SQL Delete

会员登陆

帐号

密码

回答

记住密码

忘记密码? 注册

SQL
SQL Create View
SQL Server
SQL 速查
SQL 摘要
MYSQL 列类型存储..

SQL Delete


作者:w3pop.com 翻译/整理:w3pop.com 发布:2007-04-28 浏览:3959 :: ::

DELETE 声明

The DELETE statement is used to delete rows in a table.
DELETE 声明常用来删除表中的数据。

语法

DELETE FROM table_name
WHERE column_name = some_value


Person:

LastName FirstName Address City
Nilsen Fred Kirkegt 56 Stavanger
Rasmussen Nina Stien 12 Stavanger


Delete a Row
删除一条记录

"Nina Rasmussen" is going to be deleted:
"Nina Rasmussen" 的所有个人信息将被删除:

DELETE FROM Person WHERE LastName = 'Rasmussen'

结果

LastName FirstName Address City
Nilsen Fred Kirkegt 56 Stavanger


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
DELETE * FROM table_name

评论 (0) All