Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mysql事务的使用 #32

Open
storyflow opened this issue Jul 18, 2018 · 2 comments
Open

Mysql事务的使用 #32

storyflow opened this issue Jul 18, 2018 · 2 comments

Comments

@storyflow
Copy link
Owner

No description provided.

@storyflow
Copy link
Owner Author

storyflow commented Jul 18, 2018

MySQL的DDL语句是非事务的,即不能对DDL语句进行回滚操作。

在写程序时,应当将DDL和DML语句以及DCL语句严格分开,避免事务被隐性“破坏”,导致误操作情况发生。

@storyflow
Copy link
Owner Author

DML (data manipulation language): 
它们是SELECT、UPDATE、INSERT、DELETE,就象它的名字一样,这4条命令是用来对数据库里的数据进行操作的语言 
DDL (data definition language): 
DDL比DML要多,主要的命令有CREATE、ALTER、DROP等,DDL主要是用在定义或改变表(TABLE)的结构,数据类型,表之间的链接和约束等初始化工作上,他们大多在建立表时使用 
DCL (Data Control Language): 
是数据库控制功能。是用来设置或更改数据库用户或角色权限的语句,包括(grant,deny,revoke等)语句。在默认状态下,只有sysadmin,dbcreator,db_owner或db_securityadmin等人员才有权力执行DCL  
 DQL( Data Query Language)  
数据查询语言,数据查询语言DQL基本结构是由SELECT子句,FROM子句,WHERE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant