SQL is a language for accessing and manipulating databases, it includes database creation, deletion, fetching rows and modifying rows etc.
What is SQL?
- SQL stands for Structured Query Language
- It is a language for storing, manipulating and retrieving data stored in relational database.
- SQL is an ANSI (American National Standards Institute) standard
Why SQL and What SQL can do?
- SQL can retrieve data from a database
- SQL can execute queries against a database
- SQL can insert records in a database
- SQL can update records in a database
- SQL can create new tables in a database
- SQL can create stored procedures in a database
- SQL can delete records from a database
- SQL can create new databases
- SQL can create views in a database
- SQL can set permissions on tables, procedures, and views
Basic SQL Commands
The standard SQL commands to interact with relational databases are CREATE, SELECT, INSERT, UPDATE, DELETE and DROP. These commands can be classified into groups based on their nature:
- DDL - Data Definition Language: CREATE, ALTER, DROP
- DML - Data Manipulation Language: SELECT, INSERT, UPDATE, DELETE
- DCL - Data Control Language: GRANT, REVOKE
We will read about these commands in detail later