Junior — Middle
Can you name the main categories of commands used in SQL for working with a database?
sobes.tech AI
Answer from AI
Main categories of SQL commands for working with a database:
-
DDL (Data Definition Language) — commands for defining the database structure:
CREATE— creating tables, databases, and other objects.ALTER— modifying the structure of existing objects.DROP— deleting objects.
-
DML (Data Manipulation Language) — commands for working with data:
SELECT— data retrieval.INSERT— inserting new records.UPDATE— updating existing records.DELETE— deleting records.
-
DCL (Data Control Language) — access control commands:
GRANT— granting permissions.REVOKE— revoking permissions.
-
TCL (Transaction Control Language) — transaction management commands:
COMMIT— confirming a transaction.ROLLBACK— rolling back a transaction.SAVEPOINT— setting a save point within a transaction.