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
In DDL we use
DDL
CREATE – Creates objects in the database
ALTER – Alters objects of the database
DROP – Deletes objects of the database
TRUNCATE – Deletes all records from a table and resets table identity to initial value.
DML
SELECT – Retrieves data from a table
INSERT – Inserts data into a table
UPDATE – Updates existing data into a table
DELETE – Deletes all records from a table
DCL
GRANT – Gives user’s access privileges to database
REVOKE – Withdraws user’s access privileges to database given with the GRANT command
TCL
COMMIT – Saves work done in transactions
ROLLBACK – Restores database to original state since the last COMMIT command in transactions
SAVE TRANSACTION – Sets a savepoint within a transaction
its really very helpful and very easy to understand. thanx a lot
what is the difference between drop,delete,truncate commands? and please explain clearly what is the operation of DCL command ?
Have a look at them in SQL Server help file
gud work….!!
can u plz upload some sql queries …
like those which would help in interviews…
hi…..sir
could u tell me totally how many commands are there in sql server
Regards
madhusudan
hi shirisha
Difference between Drop,Delete and truncate is
Drop- Drop command will delete the entire row also the structure.it is DDL command.
Delete- Delete command only remove the data from the table.it is DML command. You can Rollback.
Truncate- truncate will delete the contents not the strucure. it is DDL command.In truncate you cant rollback.it removes record permanently.you cant use where clause in Truncate.
Hello Mr.dave.
Question : The __________ component is used to administer permissions on the databases and database objects.
Please tell me about above Question
what is the major difference between drop an delete.
who devolped SQL and ORACLE
what is BAN
Have you googled/binged?
Difference between Drop and Delete are as follows:
1) DROP is a DDL statement in order to drop the table and database:
i) SYNTAX:
DROP TABLE TABLE_NAME;
DROP DATABASE DATABASE_NAME;
EXAMPLE:
DROP TABLE EMP_DEPARTMENT;
DROP DATABASE EMPLOYEE
ii) When we used DROP TABLE it deletes the entire table data with a structure(column names also).
iii) When we used DROP DATABASE it deletes the entire DATABASE containing a number of tables, functions, stored procedures …………………n .
2) DELETE:
i) Delete command is used to delete the data within a table and not for any database.
ii) When we use Delete command it only deletes the data within a table but keeps the structure of table as it is.
SYNTAX: DELETE TABLE_NAME
EXAMPLE:
DELETE EMPLOYEE;
(That is it kees the table name as it is)
I hope , after reading this you would be satisfied.
hello, i am Bivash Kumar Singh. i am complite Gniit from kolkata, but i am not so confedent in sql so what should i do
Hello Pinal,
Could you please tell me how to view the pseudo columns in SQL Server 2005
how can we copy a old database in new database
Use SSIS or do backup and restore
thanks madhivanan can you tell me about how use it
Backup source db
Backup database db_name to disk=’your ptah’
Restore in target db
restore database db_name from disk=’your ptah’
hii sir,
can i know how to use grant and revoke in sql server 2005 with syntax
pls
hi sir,
can i know how to rollback deleted data in sql server 2005 with syntax
thank you
hi guys.. i have one doubt?
tcl means transcational control language..?
dtl means data transcation language?
what is the difference between these two?
in tcl they told only committ and rollback.. they are not mentioned the svae point in the tcl.. but dtl they mentioned…
what is the exact difference between thes two?
Hi sir i hav a one doubt DDL command which times is used pls tell me sir.Santhosh
very niceee definatoin of DDL DML DCL TCL…. BUT i have a ques in my mind what is DQL…..plzzz tell meeee……..
Sir, I want merge two table Without relationship using pseudo-column how??
… Please help me…
You need to post some sample data with expected result to help you. Be clear on what you want
DDL (Data Definition Language): CREATE, ALTER, DROP
DML(Data Manipulation Language) : INSERT, UPDATE, DELETE
DCL (Data Control Language) : GRANT, REVOKE
TCL (Transactional Control Language) : COMMIT, SAVE POINT, ROLLBACK
DQL (Data Query Language) : SELECT
hello every one this is EKRAR and i want your help
actually i want to create a whole database for practice but i dont have any idea that how many table should be in that and what should be the name of thats table and what type of data should be in that
so any one is here who can help my
i really needy for your suggestion
and i am waiting for your suggestion at
[email removed]
If you just want database for practice use Adventureworks database
where from i can get Adventureworks database