Introduction to
SQL
SQL is a standard language for sorting, manipulating and retrieving data from databases. SQL stands for Structured Query Language that let you access and manipulate databases.
Power of SQL:
- SQL can execute queries against a database
- SQL is used to insert data into a database
- SQL is used to retrieve data from a database
- SQL is used to update/edit data of a database
- SQL is used to delete/remove data of a database
- SQL is used to create database and tables
- SQL is used to create stored procedures
- SQL is used to create view in a database
- SQL is used to set permission on tables, procedures and views
Commands of SQL
Below are some most important and basic commands of SQL.
Command | Description |
---|---|
SELECT | It extracts data from a database |
UPDATE | It updates data in a database |
DELETE | It deletes data from a database |
INSERT INTO | It inserts new data into a database |
CREATE DATABASE | It creates a new database |
ALTER DATABASE | It modifies a database |
CREATE TABLE | It creates a new table |
ALTER TABLE | It modifies a table |
DROP TABLE | It deletes a table |
CREATE INDEX | It creates an index |
DROP INDEX | It deletes an index |