SQL or Structured Query Language is a language which is used to
communicate with a relational database. It provides a way to manipulate
and create databases. It is a database language used
for database creation, deletion, fetching rows and modifying rows etc.
sometimes it is pronounced as se-qwell. It appeared in 1974. It is used like commanding language to access databases.
Usages of SQL
- To execute queries against a database
- To retrieve data from a database
- To inserts records in a database
- To updates records in a database
- To delete records from a database
- To create new databases
- To create new tables in a database
- To create views in a database
SQL doesn't have loop or conditional statement.
Subsets of SQL
- Data definition language (DDL)
- Data manipulation language (DML)
- Data control language (DCL)
1. Data definition language (DDL) allows you to CREATE, ALTER and DELETE
database objects such as schema, tables, view, sequence etc.
2. Data manipulation language (DML) makes user able to access and manipulate data. It is used to perform following operations.
- Insert data into database
- Retrieve data from the database
- Update data in the database
- Delete data from the database
3. Data control language (DCL) allows you to control access to the database. It includes two commands GRANT and REVOKE.
GRANT: to grant specific user to perform specific task.
REVOKE: to cancel previously denied or granted permissions.
Type of operators available in SQL:
- Arithmetic operators
- Logical operators
- Comparison operator
No comments:
Post a Comment