The components of SQL are given below.
DDL commands (3 commands)
- Create table: Used to create a table.
- Alter table: Used to modify existing column or add new column to an existing table. There are 2 keywords used ADD and MODIFY.
- Drop table: Used to remove a table from the memory.
DML commands (4 commands)
- Select: Used to select rows from a table. The keyword From is used with this. Where clause is used to secify the conition.
- Insert: Used to insert new records into a table. So the keyword used is INTO.
- Delete: Used to delete records in a table.
- Update: Used to modify the records in a table the keyword used is set.
DCL (Data Control Language) commands
- Grant: It grants permission to the users to the database
- Revoke: It withdraws user’s rights given by using Grant command.