SQL Overview – SQL TUTORIAL | Software Testing Material

SQL Overview:

SQL Overview: SQL stands for Structured Query Language. It is an American National Standard Institute (ANSI) standard. It is a standard language for accessing and manipulating databases. Using SQL, some of the action we could do are to create databases, tables, stored procedures (SP’s), execute queries, retrieve, insert, update, delete data against a database.

SQL keywords are not case sensitive.

Example: CREATE is same as create.

SQL commands are segregated into following types:

  1. DDL – Data Definition Language
  2. DML – Data Manipulation Language
  3. DQL – Data Query Language
  4. DCL – Data Control Language
  5. TCL – Transaction Control Language

Let’s see each type in detail:

i. DDL(Data Definition Language):  Allows to work with the Structure or Definition of the data

SQL commands come under DDL are as follows: CREATE, ALTER, DROP, TRUNCATE, COMMENT, RENAME

ii. DML(Data Manipulation Language): To deal with the data itself directly

SQL Commands come under DML are as follows: INSERT, UPDATE, DELETE

iii. DQL(Data Query Language): Deals with the data but to retrive the data

SQL Commands come under DQL are as follows: SELECT

iv. DCL(Data Control Language): Controls the data

SQL Commands come under DCL are as follows: GRANT, REVOKE, DENY

v. TCL(Transaction Control Language): Deals with the transaction management

SQL Commands come under TCL are as follows: COMMIT, ROLEBACK, SAVE

Most important SQL Commands are as follows:

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 – It creates a new DataBase/Table/Index
ALTER – It modifies a DataBase/Table
DROP – It deletes a table/Index

In the next tutorial, we will see Data Types In SQL

Check out the complete SQL Tutorial by clicking on below link:

SQL Tutorial – Complete