What is SQL? How many types of Commands in SQL?

SQL:

  • The Structured Query Language (SQL) is the language of databases.
  • All modern relational databases, including Access, FileMaker Pro, Microsoft SQL Server and Oracle use SQL as their basic building block.
  • In fact, it’s often the only way that you can truly interact with the database itself.
  • All of the fancy graphical user interfaces that provide data entry and manipulation functionality are nothing more than SQL translators.
  • They take the actions you perform graphically and convert them to SQL commands understood by the database.
  • SQL is Similar to English
  • Fortunately, at its core, SQL is a simple language.
  • It has a limited number of commands and those commands are very readable and are almost structured like English sentences.


SQL Commands:

SQL commands are instructions. It is used to communicate with the database. It is also used to perform specific tasks, functions, and queries of data.


Types of SQL Commands:

The Data Definition Language (DDL) contains the commands used to create and destroy databases and database objects.

  • Create
  • Alter
  • Drop
  • Truncate



After the database structure is defined with DDL, database administrators, users can utilize the Data Manipulation Language (DML) to insert, retrieve and modify the data contained within it.

  • Insert
  • Update
  • Delete



Data Query Language (DQL) contains commands to perform querying and retrieving data from table.

  • Select


While Data Control Language contains commands to secure and control access to database and its objects.

  • Grant
  • Revoke



TCL means Transaction Control Language. These SQL Server TCL commands will control the Transactions.
TCL commands can only use with DML commands like INSERT, DELETE and UPDATE only.
  • Commit
  • Rollback
  • Savepoint


Video Tutorial in Hindi:




Follow Us :-

YouTube:




Post a Comment

0 Comments