The main categories are as follows:
1. Data Definition Language (DDL ):
Create table can create tables, alter table can modify the table structure, drop table to delete a table.
2. Data Query Language: The select User retrieves database data.
3. Date Manipulation Language (DML): insert, update, and delete.
4. Date Control Language (DCL ):
Grant is used to grant permissions to a user or role, and revoke revokes the permissions of the user or role.
5. Transaction Control Language (TCL ):
Commit is used to confirm database changes,
Rollback is used to cancel database changes,
Savepoint is used to set the save point to Cancel Changes in some databases.
SQL statement writing rules:
SQL keywords, object names, and columns are case-insensitive. However, SQL statements reference character values and date values, which must be case sensitive.
For example, select * from dept t where t. dname = 'sales ';