Data definition language (DDL) statements define, alter the structure of, and drop
schema objects. DDL statements enable you to:
Create, alter, and drop schema objects and other database structures, including
the database itself and database users (CREATE, ALTER, DROP)
Change the names of schema objects (RENAME)
Delete all the data in schema objects without removing the objects’ structure
(TRUNCATE)
Grant and revoke privileges and roles (GRANT, REVOKE)
Turn auditing options on and off (AUDIT, NOAUDIT)
Add a comment to the data dictionary (COMMENT) drop table是删除表。 truncate table是删除表内数据。 truncate是DDL语句,所以它所做的删除是无法通过闪回找回的。 truncate连同索引一并删除。 delete是DML语句,它所做的删除可以通过闪回找回。 truncate删除大量数据时,效率高于delete。 用truncate删除相当于永久删除。
Oracle数据库SQL相关总结
最新推荐文章于 2024-01-31 17:33:42 发布