数据库删除语句 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…
实验准备:-- 创建实验表CREATE TABLE p_andy(ID number(10), NAME varchar2(40))PARTITION BY RANGE (id)(PARTITION p1 VALUES LESS THAN (10),PARTITION p2 VALUES LESS THAN (20));Table created.-- 查看现在表的分区:SQL> col table_name for a25col partition_name for a25select tab…
DELETE DATABASE and DELETE USER statements delete all data tables, views, and macros from a database or user. The database or user remains in the Teradata Database as a named object and retains the available space. None of that space is any longer in…