What is SQL?
SQL is Structured Query Language. It helps to execute queries against database. It helps to insert, retrieve, update and delete data from database.
Categories of SQL:
1.DDL (Data Definition Language): Defines structure and relationship of data.
Create: To create object of database such as table, view etc.
Alter: To alter structure of database
Drop: To delete structure of database
Truncate: To remove only record, but structure is exists
Rename: To rename object of database such as table, view etc
2.DML (Data Manipulation Language): To perform some set of operations on database
Select: To retrieve data from database
Insert: To store data inside database
Update: To update data
Delete: To delete Record from database
3.DCL (Data Control Language): To provide controlled access to database
Grant: To give access privileges to different database users
Revoke: To remove assigned privileges from users
4.TCL (Transaction Control Language): Manages the change made by DML statements. For Example, commit, Rollback, Savepoint etc.
Constraints in SQL:
Advantages of SQL:
It has good Portability.
It is interactive language
No coding required
It has high speed.