What is SQL Sub Languages Working with Sub-Languages of SQL - LearnHowToCode SarkariResult.com Interview Questions and Answers LearnHowToCodeOnline
What is SQL Sub Languages Working with Sub-Languages of SQL

What is SQL Sub Languages Working with Sub-Languages of SQL

What is SQL Sub Languages Working with Sub-Languages of SQL  

SQL commands are grouped into below major categories depending on their functionality

    1) Data Definition Language (DDL)
    2) Data Manipulation Language (DML)
    3) Transaction Control Language (TCL)
    4) Data Control Language (DCL)
    5) Data Query Language (DQL)


Data Definition Language (DDL): -DDL commands are used to create, alter, drop, rename of database objects like table, view, sequence, index etc. These commands work on the structure.

Below are listed command under DDL
        1) CREATE
        2) ALTER
        3) DROP
        4) RENAME
        5) TRUNCATE
        6) COMMENT
Data Manipulation Language (DML):-DML commands work on records in a table. These are basic operations we perform on data such as inserting new records, deleting unnecessary records, and updating existing records.

Below are listed command under DDL
    
  • SELECT - retrieve data from a database
  • INSERT - insert data into a table
  • UPDATE - updates existing data within a table
  • DELETE - Delete all records from a database table
  • MERGE - UPSERT operation (insert or update)
  • CALL - call a PL/SQL or Java subprogram
  • EXPLAIN PLAN - interpretation of the data access path
  • LOCK TABLE - concurrency Control

Transaction Control Language (TCL):- The commands of SQL that are used to control the transactions made against the database.

Below are listed command under DDL
  
  • COMMIT - commits a Transaction
  • ROLLBACK - rollback a transaction in case of any error occurs
  • SAVEPOINT - to rollback the transaction making points within groups
  • SET TRANSACTION - specify characteristics of the transaction

Data Control Language (DCL):-These commands of SQL are used to give the permission or revoke the permission on System/User's objects to user/role in the database

Below are listed command under DDL
         1) GRANT
         2) REVOKE

Data Query Language (DCL):-This command is used to select the data from database tables,view, synonyms, and sequence etc.

Below are listed command under DDL
         1) SELECT

NOTE:- TCL Commands(COMMIT,ROLLBACK,SAVEPOINT) are used for only DML Commands (INSERT,UPDATE,DELETE) while DDL,DCL commands are Auto-committed. 

About Mariano

I'm Ethan Mariano a software engineer by profession and reader/writter by passion.I have good understanding and knowledge of AngularJS, Database, javascript, web development, digital marketing and exploring other technologies related to Software development.

0 comments:

Featured post

Political Full Forms List

Acronym Full Form MLA Member of Legislative Assembly RSS Really Simple Syndication, Rashtriya Swayamsevak Sangh UNESCO United Nations E...

Powered by Blogger.