Aspdotnet-Suresh

aspdotnet-suresh offers C#.net articles and tutorials,csharp dot net,asp.net articles and tutorials,VB.NET Articles,Gridview articles,code examples of asp.net 2.0 /3.5,AJAX,SQL Server Articles,examples of .net technologies

SQL SERVER DML, DDL, DCL and TCL Commands Examples

Jun 6, 2015
Introduction:

Here I will explain what is the difference between DDL, DML, DCL and TCL commands or statements in
sql server with examples. In sql server database operations like insert, update, delete, etc… categorized into multiple operations those are DDL, DML, DCL and TCL. In sql server DDL means data definition language, DML means data manipulation language, DCL means data control language and TCL means transactional control language.
Description:

DDL commands in SQL

In sql server DDL means data definition language command. Generally we will use these commands to create or modify existing structure of database objects like create, alter, drop or truncate database objects in database. In sql server following operations will come under DDL operations

CREATE – By using this operation we can create objects (like Tables, procedures, etc…) in database

ALTER – we can modify objects (like Tables, procedures, etc…) in database

DROP – we can drop or delete objects in database

TRUNCATE – It will delete all the records from table and it will reset identity of column to initial value

DML commands in SQL

In sql server DML means data manipulation language command. Generally we will use these commands to perform multiple operations like insert, update, retrieve and delete data in database. In sql server following operations will come under DML operations

INSERT – By using this operation we can insert data in table

SELECT – we can get or retrieve data from table

Delete – we can delete data from table

Update – we can update data from table

DCL commands in SQL

In sql server DCL means data control language command. Generally we will use these commands to secure database objects by creating roles, permissions using GRANT, REVOKE operations. In sql server following operations will come under DCL operations

GRANT – By using this operation we can create access permissions for users to database

REVOKE – we can rollback or take back user access permissions for database

TCL commands in SQL

In sql server TCL means transactional control language command. Generally we will use these commands to perform multiple transactional operations like commit, rollback, save transactions in database. In sql server following operations will come under TCL operations

COMMIT – By using this operation we can save work we done in transactions

ROLLBACK – we can rollback database to original state before COMMIT operation on transactions

SAVE TRANSACTION – we can set save point in transcations

If you enjoyed this post, please support the blog below. It's FREE!

Get the latest Asp.net, C#.net, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email.

subscribe by rss Subscribe by RSS subscribe by email Subscribe by Email

0 comments :

Give your Valuable Comments

Note: Only a member of this blog may post a comment.

© 2015 Aspdotnet-Suresh.com. All Rights Reserved.
The content is copyrighted to Suresh Dasari and may not be reproduced on other websites without permission from the owner.