x

What is DML in T-SQL?

I see lots of articles that use the term DML. What exactly does this mean and what are examples of it? Are all T-SQL statements DML?

more ▼

asked Oct 19, 2009 at 11:44 AM in Default

avatar image

Steve Jones - Editor ♦♦
5.1k 79 93 87

(comments are locked)
10|1200 characters needed characters left

2 answers: sort voted first

DML stands for Data Manipulation Language so any statement that manipulates data would be DML, like SELECT, INSERT, UPDATE, DELETE, and MERGE.

Another type of T-SQL statements are DDL (Data Definition Language) and this is where you define the structures for your data like CREATE, ALTER, DROP.

A third type would be Access Control which would be things like GRANT, REVOKE, DENY. I don't think these fit in DML or DDL.

more ▼

answered Oct 19, 2009 at 11:58 AM

avatar image

Jack Corbett
1.1k 3 4 7

(comments are locked)
10|1200 characters needed characters left

DML stands for 'Data Manipulation Language' and covers all T-SQL statements that retrieve, store or modify data.

DDL is the other main category, and stands for 'Data Definition Language'. This covers T-SQL statements that modify objects in the schema.

Edit -> thought i should mention the other categories, as Jack did.

You have DCL - 'Data Control Language' - which as Jack says is to do with data security.

Then you have TCL - 'Transaction Control Language' - which are statements to do with opening and closing transactions.

more ▼

answered Oct 19, 2009 at 11:59 AM

avatar image

Matt Whitfield ♦♦
29.5k 62 66 88

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x1067
x10

asked: Oct 19, 2009 at 11:44 AM

Seen: 4158 times

Last Updated: Oct 19, 2009 at 11:44 AM

Copyright 2016 Redgate Software. Privacy Policy