Introduction To SQL
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)
Example:-
CREATE- to create database or table.
ALTER- to alter table
DROP- deleting table or database.
TRUNCATE- remove all records from database.
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.
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.
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.
ROLLBACK- restores the state of database till last commit.
Introduction To SQL
Reviewed by vishal
on
August 02, 2017
Rating:
No comments