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

Data Manipulation Language

Data Manipulation Language (DML) is used for manipulating data in databases, including commands for inserting, updating, deleting, and selecting records. The INSERT command adds records, SELECT retrieves them, DELETE removes them based on specified conditions, and UPDATE modifies existing data. Each command has specific syntax and conditions that dictate how data is managed within the database.

Uploaded by

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

Data Manipulation Language

Data Manipulation Language (DML) is used for manipulating data in databases, including commands for inserting, updating, deleting, and selecting records. The INSERT command adds records, SELECT retrieves them, DELETE removes them based on specified conditions, and UPDATE modifies existing data. Each command has specific syntax and conditions that dictate how data is managed within the database.

Uploaded by

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

DML: Data Manipulation Language

Data Manipulation Language:


• Data Manipulation Language commands are used for
manipulating data in the database. DML commands are used
for update, insert, delete and alter of data in the database.
Some of the DML commands commonly used by the
programmers while dealing with the database are given
below:

• Insert
• Update
• Delete
• Select
INSERT:

• INSERT command is used for the insertion of


one or more records in the table.
Insert:
• If we want to insert the data on particular
columns, column names need to be specified
in the SQL command.
Select:
• SELECT Command is used to retrieve the records from the
table.
• It is one of the most commonly used commands while
working with the databases because at the end-user wants to
retrieve the results after any operation be it update, delete or
modify.
Select:
Syntax:

SELECT is the keyword that starts the query and instructs MySQL on what task it
must perform.
FROM is a mandatory clause that specifies the table or tables to select the data
from (if you apply to multiple tables, you must separate their names by commas
or use the JOIN method).
WHERE is an optional condition, though it is very frequent in MySQL SELECT
statements – it specifies the criteria to define the necessary data and return it.
Select:
Select using where clause:
Delete:
• DELETE command is used to delete one or more records from
the table on the basis of the where condition specified in the
command.
• If where the condition is not specified in the SQL command
with DELETE, the whole table will get deleted.
Update:

Update is used to modify the existing data that is present in the table. Update
set will modify the single row values or multiple row values based on the
condition specified in the ‘WHERE’ clause. The rows that satisfy the ‘Where’
clause condition will be modified and the rest remains unchanged. We pass the
values using the ‘SET’ clause. If we omit the ‘where’ clause, then the ‘Update’
will set all the rows in the table.
How does MySQL Update Set Works?
How does MySQL Update Set Works?
How does MySQL Update Set Works?

Select * from test_update;


How does MySQL Update Set Works?

You might also like