0% found this document useful (0 votes)
11 views9 pages

DBMS 7 (SQL)

The document outlines various SQL commands categorized into DML, DCL, TCL, and DQL. DML commands allow for data manipulation such as inserting, updating, and deleting records, while DCL manages user permissions. TCL ensures transaction integrity, and DQL is used for data extraction with the SELECT command.

Uploaded by

hirshah8523
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)
11 views9 pages

DBMS 7 (SQL)

The document outlines various SQL commands categorized into DML, DCL, TCL, and DQL. DML commands allow for data manipulation such as inserting, updating, and deleting records, while DCL manages user permissions. TCL ensures transaction integrity, and DQL is used for data extraction with the SELECT command.

Uploaded by

hirshah8523
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

SQL Concepts & Queries- Lab

SQL COMMANDS
DML (Data Manipulation Language)

• The DML commands in Structured Query


Language change the data present in the SQL
database.
• We can easily access, store, modify, update
and delete the existing records from the
database using DML commands.
DML (Data Definition Language)

• INSERT - Allows users to insert data in


database tables.
• UPDATE- Allows users to update or modify
the existing data in database tables.
• DELETE - Allows SQL users to remove
single or multiple existing records from the
database tables.
Update Command
• Syntax:
UPDATE table_name SET
[column_name1= value_1,
column_name2= value_2,...] WHERE
CONDITION;
Delete Command
• Syntax:
DELETE FROM table_Name WHERE
condition;
DCL (Data Control Language)

• DCL includes commands such as GRANT and


REVOKE.
• DCL mainly deal with the rights, permissions,
and other controls of the database system.
• 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.
TCL(Transaction Control Language)
• Transactions group a set of tasks into a single
execution unit.
• Each transaction begins with a specific task
and ends when all the tasks in the group
successfully complete.
• If any of the tasks fail, the transaction fails.
TCL(Transaction Control Language)
• Following TCL commands are used to control
the execution of a transaction.
• Commit: Commits a Transaction.
• Rollbacks: Rollbacks a transaction in
case of any error occurs.
• Save Point: Sets a save point within a
transaction.
Data Query Language (DQL)
• SELECT command used to extract data from a
database in order to perform actions on it.

Syntax:
SELECT expression FROM table_x
WHERE code_conditions;

You might also like