Data Manipulation Language
Data Manipulation Language
• Insert
• Update
• Delete
• Select
INSERT:
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?