1. Classification of SQL statements
DQL (data query statement) —> query statement, all select statements are DQL
DML (Data Manipulation Language)—>Adding, deleting and modifying the data in the table are all DML, such as: insert, delete, update
DDL (Data Definition Language)—>Additions, deletions, and modifications to the table structure are all DDL, such as: create, drop, alter
TCL (Transaction Control Language)—>commit commits the transaction, rollback rolls back the transaction
DCL (Data Control Language)—>grant authorization, revoke revocation authority, etc.
2. SQL script
When the extension of a file is .sql, and a large number of SQL statements are written in the file, we call such a file a sql script.
note:
(1) The sql script can be executed directly by using the score command;
(2) When the amount of data in the sql script is too large to open, we can use the score command to complete the initialization.