DML
DML is abbreviation of Data Manipulation Language. It is used to retrieve, store, modify, delete, insert and update data in database.
Examples: SELECT, UPDATE, INSERT statements
DDL
DDL is abbreviation of Data Definition Language. It is used to create and modify the structure of database objects in database.
Examples: CREATE, ALTER, DROP statements
DCL
DCL is abbreviation of Data Control Language. It is used to create roles, permissions, and referential integrity as well it is used to control access to database by securing it.
Examples: GRANT, REVOKE statements
TCL
TCL is abbreviation of Transactional Control Language. It is used to manage different transactions occurring within a database.
Examples: COMMIT, ROLLBACK statements
Reference : Pinal Dave (https://blog.sqlauthority.com)
170 Comments. Leave new
@rizal
Those are clauses, they, by themselves, are not any of the types.
For example, WHERE is used in SELECT (DML) and CREATE (DDL).
hiiii,sir
you have a such a nise knowledge
DML:- DML is abbreviation of Data Manipulation Language. It is used to retrieve, store, modify, delete, insert and update data in database. Examples: SELECT, UPDATE, INSERT, DELETE, MERGE, CALL, EXPLAIN PLAN, LOCK TABLE statements
DDL:- DDL is abbreviation of Data Definition Language. It is used to create and modify the structure of database objects in database. Examples: CREATE, ALTER, DROP, TRUNCATE, COMMENT, RENAME statements
DCL:- DCL is abbreviation of Data Control Language. It is used to create roles, permissions, and referential integrity as well it is used to control access to database by securing it. Examples: GRANT, REVOKE statements
TCL :- TCL is abbreviation of Transactional Control Language. It is used to manage different transactions occurring within a database. Examples: COMMIT, ROLLBACK, SAVEPOINT, SET TRANSACTION statements
This is very good define for DML,DCL,DDL and TCL
DDL(Data Defination Language):
DDL is used to create the structure of the table. DDL commands are CREATE —Used to create any objects(Table,View,Trigger,Stored procedure) in the database. ALTER – Used to modify the objects in the database.DROP –this command used to drop the objects with the structure.TRUNCATE–This command also used to delete the objects. RENAME–used to modify the object name in the data base.
DML(Data Manipulation Language):
DDL commands used to create the objects, DML commands used to manipulate the objects. DML commands are INSERT–This command is used to insert the records into table, UPDATE–This command is used to update the record which is already exisiting in the table, DELETE– This command is used to delete the record which is already existing the table. It is deletes only records not the structure.
DRL(Data Retrivel Language):
DRL Command used to retrive the datafrom the database.
SELECT command used to retrive the data.
DCL(Data contole Language):
DCL commands used to security purpose.
GRANT–this command used to give the pemissons to the paricular Data.
REVOKE–This command used to release the permissions, which already given to any user.
can we perform dml operation (update,delete,—-) in views?
Ya u can perform everything in view but view is used for security purpose
Hi Bhanu,
View is just presentation of data stored in Tables.
You can only use SELECT in view.
Thanks,
Tejas
SQLYoga.com
Hello Bhanu,
we can perform update * insert operation through views using INSTEAD OF TRIGGERs.
For more information check for updatable views in following page:
https://www.microsoft.com/en-us/download/details.aspx?id=51958
Regards,
Pinal Dave
Hi Pinal,
i am new in sq l server,
i need to know how many tables, university database does want?and how many fields, each table does want?and what is relations between tables ?i appreciate u for ur answer.
hi ,
am a learner want to ask is there chance to update the number of rows by using update statement in single attempt ? pls give a solution for this question,…..
Can you give us more informations on what you want to update?
Try
update table
set
col=some_values,
.
.
where some_condition
hi,
i mean if we want to update column1 and column2,column3 data,all this three columns we want to update in diffirent data variations how can we get this in a single attempt with using update statement it is possible? waiting for ans
I am not satisfied for this answer. Please briefly describe about this.
I’m being told that “SELECT INTO” is DDL, not DML. Is this true? If so, why – because it creates a table? Thanks.
U can use subquery here.
Deepak Dube
It is true because for insert we use this and insert may contain in DML.
hello frnd,s
i want to ask how i can use ddl & dml commands in dbase 6.0.
Thanks for the no-fluff answer to my “What the heck is DCL?” question.
I need example these are commands.can you give me some example
what is the meaning of MSC DCL in bank statement?
select is a DDL or DRL??????????????
Hi Lalit,
select is a DML instruction.
Select is not a DDL nor a DRL it’s a ‘DQL’
“Data Query Language”
Syntax:
SELECT * FROM TABLE_NAME ;
Select is used to Rerieve data from Tables.
And only ‘select’ comes under DRL (Data Retreival Language)
Hi Dave,
I am new to MSSQL SERVER.
I worked with Oracle Server previously.
I appreciate u for ur kind help in advanced…
DR : Select.
DML : Insert, Update, Delete, Merge.
DDL : Create, Alter, Drop, Rename, Truncate.
TC : Commit, Rollback, Savepoint.
DCL : Grant, Revoke.
why we say SELECT as ddl statement?
It is dml command, using this u can manipulate a data by usng where and other conditions
hi
i want some practicakl exmaple of sql server’s commands..
i hope u’ll show me this..
thanks
prishu
what about dropping a stored procedure.
Is it a DDL or DML Script??
It is DDL