Introduction To SQL




SQL stands for Structures Query Language. SQL is used to communicate with the database. It has been standard language to communicate with relational databases. Using SQL , we can perform the tasks such as retrieving data from database, inserting data into tables, updating records in tables etc.

SQL was first appeared in 1974 brought up by IBM developers Donald D Chanmberlin and Raymond F Boyce. The development started in early 1970 and released first version of relational schema in 1974.

SQL is a set of guidelines and rules ro perform operations on databases. There are various types of operations or commands such as select, insert , update etc These commands are categorized in various types DDL , DML,DCL commands.




  • DDL(Data Defination Language)
commands defines the schema of tables or databases.

           Example:-

CREATE- to create database or table.

ALTER- to alter table

DROP- deleting table or database.

TRUNCATE- remove all records from database.




  • DML(Data Modification language ). commands used to manage data withing database. These commands are responsible to change the data or remove the data from database.


Example
SELECT- retrieve data from database.

INSERT-insert records in table or databse.

UPDATE-update records in tables.

DELETE- delete records from tables.




  • DCL(Data Control Language) Used to give or revoke rights to particular user. The rights given include insert, Delete , Update etc.


GRANT-giving privileged to user to particular database.

REVOKE- withdraw privilege from user to database.




  • TCL(Transaction Control Statements.) used to maintain changes done by DML operations.These commands are useful when writing a procedure for lengthy operations which need to be commit or rollback at certain points.


COMMIT- saves the work.

ROLLBACK- restores the state of database till last commit.




Introduction To SQL Introduction To SQL Reviewed by vishal on August 02, 2017 Rating: 5

No comments