SQL is a language to operate databases; it includes database creation, deletion, fetching rows, modifying rows, etc.
SQL is an ANSI (American National Standards Institute) standard language.
SQL is stands for (Structured Query Language)
computer language for storing, manipulating and retrieving data stored in a relational database.
SQL is the standard language for Relational Database System. All the Relational Database Management Systems (RDMS) like MySQL, MS Access, Oracle, Sybase, Informix, Postgres and SQL Server use SQL as their standard database language.
The basic syntax for writing SQL EXPLAIN queries is as follows :
EXPLAIN SELECT column_names(s) FROM table_name;
EXPLAIN keyword on its own won’t run the SQL statement. If you want to check how the statistics given in the EXPLAIN information comes to reality, you may use the ANALYZE keyword along with the EXPLAIN. The syntax for the same looks something like this.
EXPLAIN ANALYZE SELECT column_names(s) FROM table_name;
The parameters used in the above syntax are :
Feel free to add other keywords and clauses like WHERE, HAVING, GROUP BY, ORDER BY, etc. in your select query. Going ahead, we will try to understand the EXPLAIN keyword in greater detail.
You need to find the best method to carry out your request. SQL engine determines how to interpret that specific task.
These components are −
Here are some commands that come under DDL:
Here are some commands that come under DML:
DCL commands are used to grant and take back authority from any database user.
Here are some commands that come under DCL:
TCL commands can only use with DML commands like INSERT, DELETE and UPDATE only.
Here are some commands that come under TCL:
DQL is used to fetch the data from the database.
It uses only one command: