You are on page 1of 8

SQL> insert into branch_details values('&branch_code','&branch_name','&loaction' ,'&fees'); Enter value for branch_code: CM Enter value

for branch_name: computer tech Enter value for loaction: A-wing Enter value for fees: 20000 old 1: insert into branch_details values('&branch_code','&branch_name','&loact ion','&fees') new 1: insert into branch_details values('CM','computer tech','A-wing','20000' ) 1 row created. SQL> / Enter value for Enter value for Enter value for Enter value for old 1: insert ion','&fees') new 1: insert ') 1 row created. SQL> / Enter value for Enter value for Enter value for Enter value for old 1: insert ion','&fees') new 1: insert 000') 1 row created. SQL> / Enter value for Enter value for Enter value for Enter value for old 1: insert ion','&fees') new 1: insert 00') 1 row created. SQL> / Enter value for Enter value for Enter value for Enter value for old 1: insert ion','&fees') new 1: insert 2000') 1 row created. branch_code: ET branch_name: elect. & telecomm. loaction: B-wing fees: 22000 into branch_details values('&branch_code','&branch_name','&loact into branch_details values('ET','elect. & telecomm.','B-wing','2 branch_code: IE branch_name: industrial elct. loaction: B-wing fees: 20000 into branch_details values('&branch_code','&branch_name','&loact into branch_details values('IE','industrial elct.','B-wing','200 branch_code: IF branch_name: information tech. loaction: A-wing fees: 25000 into branch_details values('&branch_code','&branch_name','&loact into branch_details values('IF','information tech.','A-wing','25 branch_code: CO branch_name: computer engg. loaction: A-wing fees: 18000 into branch_details values('&branch_code','&branch_name','&loact into branch_details values('CO','computer engg.','A-wing','18000

SQL> insert into stud_info values(&stud_id,'&stud_name','&dob','&city','&activit y',&leader,&ssc_per,'&branch_code','&ent_grade','&email_id') 2 ; Enter value for stud_id: 1000 Enter value for stud_name: Rajesh Enter value for dob: 11-jan-1990 Enter value for city: Nagpur Enter value for activity: Project Enter value for leader: NULL Enter value for ssc_per: 78 Enter value for branch_code: CM Enter value for ent_grade: A Enter value for email_id: ab@yahoo.com old 1: insert into stud_info values(&stud_id,'&stud_name','&dob','&city','&act ivity',&leader,&ssc_per,'&branch_code','&ent_grade','&email_id') new 1: insert into stud_info values(1000,'Rajesh','11-jan-1990','Nagpur','Proj ect',NULL,78,'CM','A','ab@yahoo.com') 1 row created. SQL> / Enter value for stud_id: 2000 Enter value for stud_name: Sanna Enter value for dob: 23-apr-1991 Enter value for city: Nanded Enter value for activity: Cultural Enter value for leader: NULL Enter value for ssc_per: 79.9 Enter value for branch_code: IF Enter value for ent_grade: A+ Enter value for email_id: sn@yahoo.com old 1: insert into stud_info values(&stud_id,'&stud_name','&dob','&city','&act ivity',&leader,&ssc_per,'&branch_code','&ent_grade','&email_id') new 1: insert into stud_info values(2000,'Sanna','23-apr-1991','Nanded','Cultu ral',NULL,79.9,'IF','A+','sn@yahoo.com') 1 row created. SQL> / Enter value for stud_id: 3000 Enter value for stud_name: Micheal Enter value for dob: 5-may-1990 Enter value for city: Kolhapur Enter value for activity: Sports Enter value for leader: NULL Enter value for ssc_per: 72 Enter value for branch_code: ET Enter value for ent_grade: A Enter value for email_id: vidya@yahoo.com old 1: insert into stud_info values(&stud_id,'&stud_name','&dob','&city','&act ivity',&leader,&ssc_per,'&branch_code','&ent_grade','&email_id') new 1: insert into stud_info values(3000,'Micheal','5-may-1990','Kolhapur','Sp orts',NULL,72,'ET','A','vidya@yahoo.com') 1 row created. SQL> / Enter value for stud_id: 1114 Enter value for stud_name: Jaya

Enter value for dob: 7-aug-1991 Enter value for city: Talegaon Enter value for activity: Project Enter value for leader: 1000 Enter value for ssc_per: 81.5 Enter value for branch_code: CM Enter value for ent_grade: B Enter value for email_id: old 1: insert into stud_info values(&stud_id,'&stud_name','&dob','&city','&act ivity',&leader,&ssc_per,'&branch_code','&ent_grade','&email_id') new 1: insert into stud_info values(1114,'Jaya','7-aug-1991','Talegaon','Proje ct',1000,81.5,'CM','B','') 1 row created. SQL> / Enter value for stud_id: 1115 Enter value for stud_name: Kartik Enter value for dob: 29-jun-1991 Enter value for city: Solapur Enter value for activity: Sports Enter value for leader: 3000 Enter value for ssc_per: 87.6 Enter value for branch_code: ET Enter value for ent_grade: B+ Enter value for email_id: old 1: insert into stud_info values(&stud_id,'&stud_name','&dob','&city','&act ivity',&leader,&ssc_per,'&branch_code','&ent_grade','&email_id') new 1: insert into stud_info values(1115,'Kartik','29-jun-1991','Solapur','Spo rts',3000,87.6,'ET','B+','') 1 row created. SQL> / Enter value for stud_id: 1117 Enter value for stud_name: Beena Enter value for dob: 28-feb-1990 Enter value for city: Kanpur Enter value for activity: Cultural Enter value for leader: 2000 Enter value for ssc_per: 83.49 Enter value for branch_code: IF Enter value for ent_grade: A Enter value for email_id: old 1: insert into stud_info values(&stud_id,'&stud_name','&dob','&city','&act ivity',&leader,&ssc_per,'&branch_code','&ent_grade','&email_id') new 1: insert into stud_info values(1117,'Beena','28-feb-1990','Kanpur','Cultu ral',2000,83.49,'IF','A','') 1 row created. SQL> / Enter value Enter value Enter value Enter value Enter value Enter value Enter value Enter value for for for for for for for for stud_id: 1118 stud_name: Danish dob: 31-dec-1990 city: Latur activity: Project leader: 1000 ssc_per: 78.01 branch_code: CM

Enter value for ent_grade: A+ Enter value for email_id: old 1: insert into stud_info values(&stud_id,'&stud_name','&dob','&city','&act ivity',&leader,&ssc_per,'&branch_code','&ent_grade','&email_id') new 1: insert into stud_info values(1118,'Danish','31-dec-1990','Latur','Proje ct',1000,78.01,'CM','A+','') 1 row created. SQL> select * from stud_info; STUD_ID STUD_NAME DOB CITY ACTIVITY LEADER SSC_PER ---------- ------------ --------- ---------- ---------- ---------- ---------BRA EN EMAIL_ID --- -- --------------1111 ajay 20-JUL-90 pune Project 1000 80 CM A+ 1112 samir CM A+ 1113 ankita IF A STUD_ID STUD_NAME DOB CITY ACTIVITY LEADER SSC_PER ---------- ------------ --------- ---------- ---------- ---------- ---------BRA EN EMAIL_ID --- -- --------------1000 Rajesh 11-JAN-90 Nagpur Project 78 CM A ab@yahoo.com 2000 Sanna IF A+ sn@yahoo.com 1115 Kartik ET B+ STUD_ID STUD_NAME DOB CITY ACTIVITY LEADER SSC_PER ---------- ------------ --------- ---------- ---------- ---------- ---------BRA EN EMAIL_ID --- -- --------------3000 Micheal 05-MAY-90 Kolhapur Sports 72 ET A vidya@yahoo.com 1114 Jaya CM B 1117 Beena IF A STUD_ID STUD_NAME DOB CITY ACTIVITY LEADER SSC_PER ---------- ------------ --------- ---------- ---------- ---------- ---------BRA EN EMAIL_ID --- -- --------------1118 Danish 31-DEC-90 Latur Project 1000 78.01 CM A+ 28-FEB-90 Kanpur Cultural 2000 83.49 07-AUG-91 Talegaon Project 1000 81.5 23-APR-91 Nanded 29-JUN-91 Solapur Cultural Sports 3000 79.9 87.6 13-MAR-91 bhopal Cultural 2000 84.39 15-SEP-90 nasik 89

10 rows selected. SQL> select stud_id,stud_name from stud_info; STUD_ID ---------1111 1112 1113 1000 2000 1115 3000 1114 1117 1118 STUD_NAME -----------ajay samir ankita Rajesh Sanna Kartik Micheal Jaya Beena Danish

10 rows selected. SQL> select stud_id,stud_name from stud_info where branch_code='CM'; STUD_ID ---------1111 1112 1000 1114 1118 STUD_NAME -----------ajay samir Rajesh Jaya Danish

SQL> update temp_stud_info set city='Pune'; 10 rows updated. SQL> update temp_stud_info set ent_grade='A+' where ssc_per='80'; 1 row updated. SQL> delete from temp_stud_info where stud_id=1111; 1 row deleted. SQL> select * from temp_stud_info; STUD_ID STUD_NAME DOB CITY ACTIVITY LEADER SSC_PER ---------- ------------ --------- ---------- ---------- ---------- ---------BRA EN EMAIL_ID --- -- --------------1112 samir 15-SEP-90 Pune 89 CM A+ 1113 ankita IF A 1000 Rajesh CM A ab@yahoo.com STUD_ID STUD_NAME 11-JAN-90 Pune Project 78 13-MAR-91 Pune Cultural 2000 84.39

DOB

CITY

ACTIVITY

LEADER

SSC_PER

---------- ------------ --------- ---------- ---------- ---------- ---------BRA EN EMAIL_ID --- -- --------------2000 Sanna 23-APR-91 Pune Cultural 79.9 IF A+ sn@yahoo.com 1115 Kartik ET B+ 3000 Micheal 05-MAY-90 Pune ET A vidya@yahoo.com Sports 72 29-JUN-91 Pune Sports 3000 87.6

STUD_ID STUD_NAME DOB CITY ACTIVITY LEADER SSC_PER ---------- ------------ --------- ---------- ---------- ---------- ---------BRA EN EMAIL_ID --- -- --------------1114 Jaya 07-AUG-91 Pune Project 1000 81.5 CM B 1117 Beena IF A 1118 Danish CM A+ 9 rows selected. SQL> delete from temp_stud_info; 9 rows deleted. SQL> select * from temp_stud_info; no rows selected SQL> insert into lab_data (item_code,item_name,quantity,make,status) values('I00 1','CRO',5,'Scientech',''); 1 row created. SQL> insert into lab_data (item_code,item_name,quantity,make,status) values('I00 2','Signal generator',5,'APLAB',''); 1 row created. SQL> insert into lab_data (item_code,item_name) values('I003','IC testor'); 1 row created. SQL> insert into lab_data values('I004','Digital CRO',2,'Sigma',''); 1 row created. SQL> insert into lab_data values('I005','Digital multimeter',3,'APLAB',''); 1 row created. SQL> insert into lab_data values('&item_code','&item_name',&quantity,'&make','&s 31-DEC-90 Pune Project 1000 78.01 28-FEB-90 Pune Cultural 2000 83.49

tatus'); Enter value for Enter value for Enter value for Enter value for Enter value for old 1: insert ,'&status') new 1: insert 1 row created. SQL> / Enter value for Enter value for Enter value for Enter value for Enter value for old 1: insert ,'&status') new 1: insert 1 row created. SQL> / Enter value for Enter value for Enter value for Enter value for Enter value for old 1: insert ,'&status') new 1: insert

item_code: I006 item_name: CRO probes quantity: 10 make: Edkit status: into lab_data values('&item_code','&item_name',&quantity,'&make' into lab_data values('I006','CRO probes',10,'Edkit','')

item_code: I007 item_name: LUX meter quantity: 5 make: APLAB status: into lab_data values('&item_code','&item_name',&quantity,'&make' into lab_data values('I007','LUX meter',5,'APLAB','')

item_code: IOO8 item_name: Analog multimeter quantity: 3 make: APLAB status: into lab_data values('&item_code','&item_name',&quantity,'&make' into lab_data values('IOO8','Analog multimeter',3,'APLAB','')

1 row created. SQL> select * from lab_data; ITEM_ ----I001 I002 I003 I004 I005 I006 I007 IOO8 ITEM_NAME QUANTITY MAKE STATUS -------------------- ---------- ---------- --------------CRO 5 Scientech Signal generator 5 APLAB IC testor Digital CRO 2 Sigma Digital multimeter 3 APLAB CRO probes 10 Edkit LUX meter 5 APLAB Analog multimeter 3 APLAB

8 rows selected. SQL> select distinct make from lab_data; MAKE ---------Scientech Edkit APLAB Sigma

SQL> select item_code,item_name from lab_data; ITEM_ ----I001 I002 I003 I004 I005 I006 I007 IOO8 ITEM_NAME -------------------CRO Signal generator IC testor Digital CRO Digital multimeter CRO probes LUX meter Analog multimeter

8 rows selected. SQL> select * from lab_data where quantity<5; ITEM_ ----I004 I005 IOO8 ITEM_NAME QUANTITY MAKE STATUS -------------------- ---------- ---------- --------------Digital CRO 2 Sigma Digital multimeter 3 APLAB Analog multimeter 3 APLAB

SQL> update lab_data set item_name='Digital CRO' where item_code='I001'; 1 row updated. SQL> update lab_data set status='Working'; 8 rows updated. SQL> delete from lab_data where quantity<5; 3 rows deleted. SQL> delete from lab_data where item_name='IC testor'; 1 row deleted.