List few commands of DDL DML and DCL

+1 vote
Hi!!

Can someone list few commands of DML, DCL, & DDL?
Nov 12, 2018 in Database by DataKing99
• 8,250 points
122,277 views

2 answers to this question.

+1 vote

The list of commands is as follows: 

Data Definition Language (DDL) commands:

  • CREATE to create a new table or database.
  • ALTER for alteration.
  • Truncate to delete data from the table.
  • DROP to drop a table.
  • RENAME to rename a table.

Data Manipulation Language (DML) commands:

  • INSERT to insert a new row.
  • UPDATE to update an existing row.
  • DELETE to delete a row.
  • MERGE for merging two rows or two tables.

Data Control Language (DCL) commands:

  • COMMIT to permanently save.
  • ROLLBACK to undo the change.
  • SAVEPOINT to save temporarily.
answered Nov 12, 2018 by Sahiti
• 6,370 points
What you have written as DCL is infact TCL. DCL is used for granting permissions to users for maintaining sessions. Eg commands: GRANT, REVOKE.

TCL is used for transaction control. Eg: ROLLBACK,COMMIT,SAVEPOINT

DCL(Data Control Language)

  • Grant
  • Revoke
–1 vote

Data Definition Language (DDL) commands:

  • CREATE to create a new table or database.
  • ALTER for alteration.
  • Truncate to delete data from the table.
  • DROP to drop a table.
  • RENAME to rename a table.

Data Manipulation Language (DML) commands:

  • INSERT to insert a new row.
  • UPDATE to update an existing row.
  • DELETE to delete a row.
  • MERGE for merging two rows or two tables.

Data Control Language (DCL) commands:

  • COMMIT to permanently save.
  • ROLLBACK to undo the change.
  • SAVEPOINT to save temporarily.
answered Dec 18, 2020 by Abdul
• 140 points