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

Steve Jones - Editor gravatar image

Steve Jones - Editor ♦♦
5.1k 78 79 82

(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

Jack Corbett gravatar image

Jack Corbett
1.1k 2 2 3

(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

Matt Whitfield gravatar image

Matt Whitfield ♦♦
29.5k 61 65 87

(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.

New code box

There's a new way to format code on the site - the red speech bubble logo will automatically format T-SQL for you. The original code box is still there for XML, etc. More details here.

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:

x991
x6

asked: Oct 19, 2009 at 11:44 AM

Seen: 3684 times

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