什么是DDL和DML? [关闭]

本文翻译自:What is DDL and DML? [closed]

Closed . 已关闭 This question needs to be more focused . 这个问题需要更加集中 It is not currently accepting answers. 它当前不接受答案。

Want to improve this question? 想改善这个问题吗? Update the question so it focuses on one problem only by editing this post . 更新问题,使其仅通过编辑此帖子来关注一个问题。

Closed 11 months ago . 11个月前关闭。

I have heard the terms DDL and DML in reference to databases, but I don't understand what they are. 我听说过有关数据库的DDL和DML术语,但我不明白它们是什么。

What are they and how do they relate to SQL? 它们是什么,它们与SQL有何关系?


#1楼

参考:https://stackoom.com/question/Aohm/什么是DDL和DML-关闭


#2楼

DML is abbreviation of Data Manipulation Language . DML是数据操纵语言的缩写。 It is used to retrieve, store, modify, delete, insert and update data in database. 它用于检索,存储,修改,删除,插入和更新数据库中的数据。

Examples: SELECT, UPDATE, INSERT statements 示例:SELECT,UPDATE,INSERT语句


DDL is abbreviation of Data Definition Language . DDL是数据定义语言的缩写。 It is used to create and modify the structure of database objects in database. 它用于创建和修改数据库中数据库对象的结构。

Examples: CREATE, ALTER, DROP statements 示例:CREATE,ALTER,DROP语句

Visit this site for more info: http://blog.sqlauthority.com/2008/01/15/sql-server-what-is-dml-ddl-dcl-and-tcl-introduction-and-examples/ 请访问此网站以获取更多信息: http : //blog.sqlauthority.com/2008/01/15/sql-server-what-is-dml-ddl-dcl-and-tcl-introduction-and-examples/


#3楼

DDL is Data Definition Language : it is used to define data structures . DDL数据定义语言 :用于定义数据结构

For example, with SQL, it would be instructions such as create table , alter table , ... 例如,对于SQL,它将是诸如create tablealter table ,...等指令。


DML is Data Manipulation Language : it is used to manipulate data itself . DML数据操纵语言 :它用于操纵数据本身

For example, with SQL, it would be instructions such as insert , update , delete , ... 例如,对于SQL,它将是诸如insertupdatedelete ,...等指令。


#4楼

DDL = Data Definition Language, any commands that provides structure and other information about your data DDL =数据定义语言,任何提供有关数据的结构和其他信息的命令

DML = Data Manipulation Language, there's only 3 of them, INSERT, UPDATE, DELETE. DML =数据处理语言,只有3种,即INSERT,UPDATE,DELETE。 4, if you will count SELECT * INTO x_tbl from tbl of MSSQL (ANSI SQL: CREATE TABLE x_tbl AS SELECT * FROM tbl ) 4,如果您SELECT * INTO x_tbl from tbl MSSQL的SELECT * INTO x_tbl from tbl计算SELECT * INTO x_tbl from tbl (ANSI SQL: CREATE TABLE x_tbl AS SELECT * FROM tbl


#5楼

In simple words. 简单来说。

DDL(Data definition language): will work on structure of data. DDL(数据定义语言):将用于数据结构。 define the data structures. 定义数据结构。

DML (data manipulation language): will work on data. DML(数据操作语言):将对数据起作用。 manipulates the data itself 操纵数据本身


#6楼

DDL is Data Definition Language: Just think you are defining the DB. DDL是数据定义语言:只是认为您正在定义数据库。 So we use CREATE,ALTER TRUNCATE commands. 因此,我们使用CREATE,ALTER TRUNCATE命令。
DML is after defining we are Manipulating the data. DML是在定义我们正在处理数据之后。 So we use SELECT,INSERT, UPDATE, DELETE command. 因此,我们使用SELECT,INSERT,UPDATE,DELETE命令。

Remember DDL commands are auto-committed. 请记住,DDL命令是自动提交的。 You don't need to use COMMIT statements. 您不需要使用COMMIT语句。
DML (Data Manipulation Language) commands need to be commited/rolled back. DML(数据操作语言)命令需要提交/回滚。

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值