Friday, March 29, 2019

SQL Commands | MYSQL Commands


SQL Commands

In SQL, there is five types of following commands.

  • Data Definition Languages (DDL)
  • Data Manipulation Language (DML)
  • Data Control Language (DCL)
  • Transactional Control Language (TCL)
  • Data Query Language (DQL)

Data Definition Language

  • DDL commands are used to change the structure of the table
  • Using with DDL commands we can creating a table, deleting a table, altering a table etc.
  • DDL are auto-committed.In other language we can say that DDL are permanently save all the changes in the database. So, we can not rollback (can not undo or re-do).
DDL Command List :

  1. CREATE
  2. ALTER
  3. DROP
  4. TRUNCATE

Data Manipulation Language

  • DML commands are used to modify the database.
  • Using with DML commands we can insert, update or delete database.
  • The command of DML is not auto-committed. In other language we can say that DDL can't permanently save all the changes in the database. They can be rollback (can undo or re-do).

DML Command List :
  1. INSERT
  2. UPDATE
  3. DELETE

Data Control Language

  • DCL commands are used to provide privileges to any database user. Like, grant and revoke (take back) authority from any database user.
  • SQL provides extensive features of security in order to safeguard information stored in its table unauthorized viewing data.
DCL Commands List :

  1. Grant
  2. Revoke

Transaction Control Language

  • TCL commands we can use only  with DML commands like INSERT, DELETE and UPDATE.
  • Operations of TCL commands are automatically committed in the database, that's why they cannot be used while creating tables or dropping them.

TCL Commands List :

  1. COMMIT
  2. ROLLBACK
  3. SAVEPOINT

Data Query Language

  • DQL is used to fetch the data from the database or table.

DQL Commands List :

  1. SELECT 

* * * * * * * * * * * * * * * * *

In Easy Language (Simplify)

1) DDL commands are used to modify the structure of database.

2) DML commands are used to modify the database.

3) DCL commands are used to provide privileges (grant, revoke) to authorized database user.

4) TCL commands are used to save database permanently (commit), un do the database
    (rollback),  and temporarily save transaction (savepoint).

5) DQL command used to select or fetch data from database.

Recommended :

DDL Commands | Data Definition Language | SQL Commands
DML Commands | Data Manipulation Language | SQL Commands
DCL | Data Control Language
TCL | TCL Commands | SQL Command
DQL Command | Data Query Language | SQL Command


Previous Post
Next Post

post written by:

0 Comments: