截断一个表Oracle特有-SQL语言基础

时间:2024-05-15 13:25:10
【文件属性】:

文件名称:截断一个表Oracle特有-SQL语言基础

文件大小:5.26MB

文件格式:PPT

更新时间:2024-05-15 13:25:10

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.


网友评论