Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Different types of SQL Commands

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 364
    Comment on it

    SQL(Structured Query Language) is a computer language used for storing, retrieving and management of data in Relational Database Management System(RDBMS).


    The commands of SQL can be categorize into following categories :


    1. DDL : DDL stands for Data Definition Language, these commands are used to define the structure of database objects.for eg. create, modify and delete database and table.

    Example of DDL Commands :

    • CREATE - used to create new database and table.
    • ALTER - used to modify the structure of the database and table
    • DROP - used to delete database and table.
    • TRUNCATE - used to remove all records from a table including all allocated spaces
    • RENAME - used to rename the database and table

    2. DML : DML stands for Data Manipulation Language, these commands are used for managing data within tables of relational database. These commands are used for insert, modify and delete data from tables.

    Example of DML Commands :

    • SELECT - used to retrieve data from the table
    • INSERT - used to insert records into table
    • UPDATE - used to update existing data of table
    • DELETE - used to delete all records from the table, the allocated space remains

    3. DCL : DCL stands for Data Control Language, which is used to set control for accessing data from the database. These commands are mainly used for creating roles and set permissions and privileges for access to database.

    Example of DCL Commands :

    • GRANT - used to give privileges to users for accessing database
    • REVOKE -used to remove access privileges given with the GRANT command

    4. TCL : TCL stands for Transaction Control Language, these commands are used for managing the transactions which changes the data stored in database.

    Example of TCL Commands :

    • COMMIT - used to save work
    • ROLLBACK - used to restore database to original state since the last COMMIT
    • SAVEPOINT - used to identify a point which is use later to ROLLBACK the changes.
    • SET TRANSACTION - used to set transaction properties such as read-write/read only access.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: