-
在Oracle-SQL语言基础上,执行表的截断操作是一项特有功能
资源介绍
截断一个表(Oracle特有)
*
SQL> TRUNCATE TABLE department;
Table truncated.
TRUNCATE TABLE 语句功能:
移除表中所有的数据行
释放表中的存储空间
在执行 TRUNCATE语句后,不能对该操作回滚。
可以用DELETE语句来做相同的操作,不过DELETE并不立即释放空间,因而可以回滚.
*
Truncating a Table
Another DDL statement is the TRUNCATE TABLE statement, which is used to remove all rows from a table and to release the storage space used by that table. When using the TRUNCATE TABLE statement, you cannot rollback row removal.
Syntax
TRUNCATE TABLE table;
where: table is the name of the table
You must be the owner of the table or have DELETE TABLE system privileges to truncate a table.
The DELETE statement can also remove all rows from a table, but it does not release storage space.
- 上一篇: 眼睛构造-灯光设计及应用
- 下一篇: 发光强度-灯光设计及应用