DQL or Data Query Language commands are used for querying data from database objects. This is only a single command which can result in records from dbo such as tables, views etc and can be subject to projection.
SELECT [ DISTINCT column_1, column_2 .. | * ] FROM <table_name> WHERE <query_condition> GROUP BY <columns_list> HAVING <condition> ORDER BY <columns_list> [ ASC | DESC ]
TCL or Transaction Control Language commands are used to enforce control on transactions within a database object which might result in a change in the state of data within the dbo.
DCL or Data Control Language commands are used enforce access control to data within the database or database objects.
DML or Data Modification Language commands are used in creating, updating or deleting data from the database objects such as tables.
DDL or Data Definition Language commands are used in defining or manipulating database schema. These are used for creating, modifying, and dropping the structure of database objects such as tables.
There are five types of commands in SQL based on the type of operation they perform:
the full syntax of a SELECT query with all the possible CLAUSES is:
SELECT column_list | * FROM table_name [ JOIN table_name1 ON join_condition ] [ JOIN table_name2 ON join_condition .. ] [ WHERE query_condition ] [ GROUP BY group_by_column_list expression ] [ HAVING query_condition ] [ ORDER BY column_list [ ASC | DESC ]