DML(data manipulation language)
It deals with data of objects it
provides 3 commands
Insert
Update
Delete
INSERT:
Syntax: insert into tablename
values(data1,data2,………datan);
UPDATE:
Syntax: update table set
<field>=<update> where <field>=<reference_data>;
Select * from singer;
NAME ADDRESS
Neha mumbai
Arejeet kolkata
update table singer set name=’arjeet’
where address=’kolkata’;
1 row updated
Select * from singer;
NAME ADDRESS
Neha mumbai
arjeet kolkata
DELETE:
Delete from table_name;
Delete from table_name where
conditional_statement;
Select * from singer;
NAME ADDRESS
Neha mumbai
arjeet kolkata
2 rows deleted;
No rows selected
Select * from emp2;
EID ENAME EADD
10 ANKIT jamshedpur
20 ankush mysore
30 anish sandore
Delete from emp2 where edi=10;
1 row deleted
It is used to retrive information from
database
It has only one select command
Syntax: select * from table_name;
Select * from stu;
ROLL NAME ADDRESS
1 rahul kerala
2 pankaj mysore
3 rohit sandore
Select * from stu where roll=2;
ROLL NAME ADDRESS
2 pankaj mysore
No comments:
Post a Comment