New Member FAQ | Forums | Earn Revenue


Resources Entrance Ask Experts Exam Papers Jobs English Projects Universities Colleges Courses Schools Training My India



My Profile
Active Members
TodayLast 7 Days more...



Awards & Gifts
Online Exams

Fresher Jobs


Our fresher job section is exclusively for fresh graduates! Find jobs for freshers in major Indian cities including Bangalore, Chennai, Hyderabad, Pune or Kochi

Resources


Find educational articles, blogs, discussion threads and other resources.

Colleges


Find details about any college in India or search for courses.

website counter



Resources » Articles/Knowledge Sharing » Education »

Dml


Posted Date: 24 Oct 2009    Resource Type: Articles/Knowledge Sharing    Category: Education
Author: sherlyMember Level: Silver    
Rating: 3 out of 53 out of 53 out of 5Points: 2



DATA MANIPULATION LANGUAGE COMMANDS

INSERT COMMAND:

INSERT SINGLE RECORD:

SQL> Insert into employeee values (100,'preethi', 29,66666.66,'28-jan-00');

1 row created.

SQL> select * from employeee;

ENO ENAME AGE SALARY DOJ
---------- --------------- ---------- ---------- ---------
100 preethi 29 66666.66 28-JAN-00

INSERT MORE RECORDS:

SQL> Insert into employeee values (&eno,'&ename', &age, &salary,'&doj');
Enter value for eno: 101
Enter value for ename: swathi
Enter value for age: 30
Enter value for salary: 66655.55
Enter value for doj: 20-dec-1999
old 1: insert into employeee values (&eno,'&ename', &age, &salary,'&doj')
new 1: insert into employeee values (101,'swathi', 30,66655.55,'20-dec-99')

1 row created.

SQL> /
Enter value for eno: 102
Enter value for ename: deepika
Enter value for age: 28
Enter value for salary: 54432.22
Enter value for doj: 20-feb-2001
old 1: insert into employeee values (&eno,'&ename',&age,&salary,'&doj')
new 1: insert into employeee values (102,'deepika',28,54432.22,'20-feb-01')

1 row created.

SQL> select * from employeee;

ENO ENAME AGE SALARY DOJ
---------- --------------- ---------- ---------- ---------
100 preethi 29 66666.66 28-JAN-00
101 swathi 30 66655.55 20-DEC-99
102 deepika 28 54432.22 20-FEB-01

UPDATE COMMAND:

SQL> Update employeee set salary=salary*0.05+salary where doj<='01-jan-00';

1 row updated.

SQL> select * from employeee;

ENO ENAME AGE SALARY DOJ
---------- --------------- ---------- ---------- ---------
100 preethi 29 66666.66 28-JAN-00
101 swathi 30 69988.33 20-DEC-99
102 deepika 28 54432.22 20-FEB-01

DELETE COMMAND:

DELETE WITH CONDITION:

SQL> Delete from employeee where age>29 and age<32;

2 rows deleted.

SQL> select * from employeee;

ENO ENAME AGE SALARY DOJ
---------- --------------- ---------- ---------- ---------
100 preethi 29 66666.66 28-JAN-00
102 deepika 28 54432.22 20-FEB-01


DELETE WITHOUT CONDITION:

SQL> delete from employeee;

2 rows deleted.

SQL> select * from employeee;

no rows selected









Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
DML  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Program for implemention Dijkstra's algorithm
Previous Resource: DCL and TCL
Return to Discussion Resource Index
Post New Resource
Category: Education


Post resources and earn money!
 
More Resources



Advertise Here





Contact Us   Advertise   Editors    Privacy Policy    Terms Of Use   

ISC Technologies.
2006 - 2009 All Rights Reserved.