Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
18 views

Introduction to SQL Queries

The document provides an introduction to SQL Queries, explaining that SQL is a language used for database operations including creation and manipulation. It categorizes SQL commands into four types: DDL (Data Definition Language), DQL (Data Query Language), DML (Data Manipulation Language), and DCL (Data Control Language), each serving distinct purposes. Specific commands within these categories are outlined, such as CREATE, SELECT, INSERT, and GRANT.

Uploaded by

shubham.soni
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

Introduction to SQL Queries

The document provides an introduction to SQL Queries, explaining that SQL is a language used for database operations including creation and manipulation. It categorizes SQL commands into four types: DDL (Data Definition Language), DQL (Data Query Language), DML (Data Manipulation Language), and DCL (Data Control Language), each serving distinct purposes. Specific commands within these categories are outlined, such as CREATE, SELECT, INSERT, and GRANT.

Uploaded by

shubham.soni
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Introduction to

SQL Queries
Introduction to SQL Queries

• Structured Query Language(SQL) as we all know is the database language by the use of which we
can perform certain operations on the existing database and also we can use this language to create
a database.

• SQL uses certain commands like Create, Drop, Insert, etc. to carry out the required tasks.

• These SQL commands are mainly categorized into four categories as:

• DDL – Data Definition Language

• DQL – Data Query Language

• DML – Data Manipulation Language

• DCL – Data Control Language


DDL (Data Definition Language)

• Data Definition Language actually consists of the SQL commands that can be used to define the
database schema

• It simply deals with descriptions of the database schema and is used to create and modify the
structure of database objects

• List of DDL commands:

• CREATE : This command is used to create the database or its objects (like table, index, function,
views, store procedure, and triggers).

• DROP: This command is used to delete objects from the database.

• ALTER : This is used to alter the structure of the database.

• TRUNCATE : This is used to remove all records from a table, including all spaces allocated for the
records are removed.
DQL (Data Query Language)

• DQL statements are used for performing queries on the data within schema objects.

• The purpose of the DQL Command is to get some schema relation based on the query passed to it

• We can define DQL as follows it is a component of SQL statement that allows getting data from the
database and imposing order upon it.

• List of DQL:

• SELECT : It is used to retrieve data from the database..


DML (Data Manipulation Language)

• The SQL commands that deals with the manipulation of data present in the database belong to DML
or Data Manipulation Language and this includes most of the SQL statements..

• It is the component of the SQL statement that controls access to data and to the database.

• List of DML commands:

• INSERT : It is used to insert data into a table.

• UPDATE : It is used to update existing data within a table.

• DELETE : It is used to delete records from a database table.

• LOCK : Table control concurrency.


DCL (Data Control Language):

• DCL includes commands such as GRANT and REVOKE which mainly deal with the rights,
permissions, and other controls of the database system.

• It is the component of the SQL statement that controls access to data and to the database.

• List of DCL commands:

• GRANT : This command gives users access privileges to the database.

• REVOKE : This command withdraws the user’s access privileges given by using the GRANT
command..

You might also like