0% found this document useful (0 votes)
262 views

DML Practical 2

The document discusses three SQL DML commands: Insert is used to add records to a table and its syntax and example are shown. Update is used to modify existing records in a table, along with its syntax and an example. Delete removes existing records from a table, and its syntax and example are also provided.
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)
262 views

DML Practical 2

The document discusses three SQL DML commands: Insert is used to add records to a table and its syntax and example are shown. Update is used to modify existing records in a table, along with its syntax and an example. Delete removes existing records from a table, and its syntax and example are also provided.
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/ 2

Practical 2

AIM: Implementation of DML(Data Manipulation Language) commands of SQL


1. Insert
Insert is used to add records into the table.
Syntax:-
insert into table_name values (val1, val2, val3,val4);
Example:-
insert into Student values(1,'Raj','BBA','A');
insert into Student values(2,'Renu','BBA','B');
insert into Student values(3,'Pihu','BCA','A');
insert into Student values(4,'Rohan','BCA','A');
insert into Student values(5,'Piyush','BBA','B');

2.Update
The UPDATE command is used to modify the existing records in a table.
Syntax:-
update table_name set column1 = value1, column2 = value2, ...where
condition;
Example:-
update Student set Name ='Renu joshi' where Roll_Number=2;
update Student set Course ='MCA' where Roll_Number=3;

3.Delete
The DELETE command is used to delete existing records in a table.
Syntax:-
delete from table_name where condition ;
Example:-
delete from Student where Roll_number=2;

You might also like