DDL,DML,DCL举例

一、DDL is Data Definition Language statements.

数据定义语言,用于定义和管理 SQL 数据库中的所有对象的语言。 

1、CREATE - to create objects in the database 创建。 

2、ALTER - alters the structure of the database 修改。 

3、DROP - delete objects from the database 删除。 

4、TRUNCATE - remove all records from a table, including all spaces allocated for the records are removed 

5.COMMENT - add comments to the data dictionary 注释。 

6.GRANT - gives user's access privileges to database 授权。 

7.REVOKE - withdraw access privileges given with the GRANT command 收回已经授予的权限。

 

二、DML is Data Manipulation Language statements.

数据操作语言,SQL中处理数据等操作统称为数据操纵语言。

1.SELECT - retrieve data from the a database 查询。

2.INSERT - insert data into a table 添加。 

3.UPDATE - updates existing data within a table 更新。 

4.DELETE - deletes all records from a table, the space for the records remain 删除。 

5.CALL - call a PL/SQL or Java subprogram 。

6.EXPLAIN PLAN - explain access path to data 。

7.LOCK TABLE - control concurrency 锁,用于控制并发。 

三、DCL is Data Control Language statements.

数据控制语言,用来授予或回收访问数据库的某种特权,并控制数据库操纵事务发生的时间及效果,对数据库实行监视等。 

1.COMMIT - save work done 提交。 

2.SAVEPOINT - identify a point in a transaction to which you can later roll back 保存点。

3.ROLLBACK - restore database to original since the last COMMIT 回滚。 

4.SET TRANSACTION - Change transaction options like what rollback segment to use 设置当前事务的特性,它对后面的事务没有影响。

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值