数据库删除语句 Drop/Delete/Truncate比较 Delete :删除数据表中的行(可以删除某一行,也可以在不删除数据表的情况下删除所有行). 删除某一行:Delete from 数据表名称 where 列名称=值: 删除所有行:Delete * from 数据表名称 Drop :删除数据表或数据库,或删除数据表字段. 删除数据库:drop database 数据库名称 删除数据表:(表的结构.属性.索引也会被删除) use 数据库名称 drop table 数据表1名称,数据表2名…
Same: delete/truncate/drop, all of them can support rollback/commit, the sample is as below: begin tran T1truncate table TestTable rollback/commit Difference: delete can support where clause, but truncate/drop cannot, that is because truncate/drop is…