DDL,DML,DCL

What are the difference between DDL, DML and DCL commands?

DDL,DML和DCL命令之间的区别?(DDL是数据定义语言,如:)
DDL is Data Definition Language statements. Some examples:
  • CREATE - to create objects in the database(在数据库中创建对象)
  • ALTER - alters the structure of the database(修改数据库的结构)
  • DROP - delete objects from the database(从数据库中删除对象)
  • TRUNCATE - remove all records from a table, including all spaces allocated for the records are removed(从一个表中移除所有记录,包括为记录分配的所有空间也一并移除)
  • COMMENT - add comments to the data dictionary(为数据字典添加备注)
  • GRANT - gives user's access privileges to database(为用户赋予访问权限)
  • REVOKE - withdraw access privileges given with the GRANT command(撤销由GRANT命令赋予的访问权限)

DML is Data Manipulation Language statements. Some examples:(DML是数据操作语言,如:)

  • SELECT - retrieve data from the a database(从指定的数据库中返回符合一定要求的数据)
  • INSERT - insert data into a table(向一个表中插入数据)
  • UPDATE - updates existing data within a table(更新表内存在的数据)
  • DELETE - deletes all records from a table, the space for the records remain(删除表中所有记录,但保留记录所占空间)
  • CALL - call a PL/SQL or Java subprogram(调用一个PL/SQL或JAVA子程序)
  • EXPLAIN PLAN - explain access path to data(解释分析数据的访问路径)
  • LOCK TABLE - control concurrency(控制并发)

DCL is Data Control Language statements. Some examples:(DCL 是数据控制语言,如:)

  • COMMIT - save work done(保存已完成工作)
  • SAVEPOINT - identify a point in a transaction to which you can later roll back(在事务中标示一个点,便于之后可以回滚到此处)
  • ROLLBACK - restore database to original since the last COMMIT(在最近一次COMMIT之后重新保存数据库)
  • SET TRANSACTION - Change transaction options like what rollback segment to use(改变事务选项)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值