Working With Tables: Data Management and Retrieval: Samia Arshad
Working With Tables: Data Management and Retrieval: Samia Arshad
SAMIA ARSHAD
DATA MANIPULATION
LANGUAGE (DML)
SQL language’s Data Manipulation
Language (DML) consists of three
statements:
INSERT
UPDATE
DELETE
DATA MANIPULATION
LANGUAGE (DML)
A new row is added to a table with
the INSERT statement
The DELETE statement removes
row(s) from a table.
Data in existing row(s) is/are
changed with the UPDATE
statement.
ADDING A NEW
ROW/RECORD
The Data Manipulation Language (DML)
statement INSERT is used to insert a
new row/record into a table.
UPDATE tablename
SET column1 = newvalue , column2
= newvalue
WHERE condition(s);
UPDATING EXISTING
ROWS/RECORDS
The condition is optional, but it is
necessary
UPDATE student
Set MajorID = 700
Where studentid=00103
DELETING EXISTING
ROWS/RECORDS
Deletion is another data
maintenance operation.
the SQL statement DELETE is used
for deleting unwanted rows. Its
general syntax is