Documentos de Académico
Documentos de Profesional
Documentos de Cultura
1. CREATING A TABLE :
Table created.
1 row created.
1 row created.
1 row created.
SQL> insert into student values('104','sumit','chennai','17');
1 row created.
Table created.
6. ANOTHER METHOD OF INSERTING DATA :
SQL>insert into project values
('&id','&name','&dept','&fess','&address');
Enter value for id: 1
Enter value for name: himanshu
Enter value for dept: bsc
Enter value for fess: 22000
Enter value for address: d.dun
old 1: insert into project values('&id','&name','&dept','&fess','&address')
new 1: insert into project values('1','himanshu','bsc','22000','d.dun')
1 row created.
SQL> /
Enter value for id: 2
Enter value for name: sushant
Enter value for dept: msc
Enter value for fess: 110000
Enter value for address: kargi
old 1: insert into project values('&id','&name','&dept','&fess','&address')
new 1: insert into project values('2','sushant','msc','110000','kargi')
1 row created.
SQL> /
Enter value for id: 3
Enter value for name: riyan
Enter value for dept: biotech
Enter value for fess: 44000
Enter value for address: nawada
old 1: insert into project values('&id','&name','&dept','&fess','&address')
new 1: insert into project values('3','riyan','biotech','44000','nawada')
1 row created.
OUTPUT :
OUTPUT :
SQL> select * from student;
1 row deleted.
OUTPUT :
SQL> select * from student;
OUTPUT :
SQL> select * from student;
OUTPUT :
SQL> select * from student;
Table created.
SQL> insert into orders values('1','19091','1');
1 row created.
SQL> insert into orders values('2','14562','2');
1 row created.
OUTPUT
SQL> select * from orders;
ORDERID ORDERNUMBER PERSONID
---------- -------------------- ------------
1 19091 1
2 14562 2
OUTPUT
PERSONID NAME AGE
---------- ---------- ----------
1 pawan 20
2 mukul 21
SUM(QUANTITY)
-------------
148
OUTPUT:
PERSONID NAME PRODUCT QUANTITY
---------- ---------- ------------- ----------
1 pawan pizza 54
2 mukul cake 69
3 harsh bread 25
COUNT(PERSONID) PRODUCT
------------------------- --------------
1 bread
1 cake
1 pizza
OUTPUT
COUNT(PERSONID) QUANTITY
---------------------- ------------
1 69
1 25
1 54
STD
ID NAME DEPT_NAME
---------- ---------- --------------
1 harsh bsc
2 sushant msc
3 rohit biotech
4 anupam bsc
5 pawan mtech
STUDENT
ID NAME DEPT_NAME
------ ---------- --------------
1 himanshu mca
2 anurag pharmacy
3 rohit biotech
4 sachin medical
5 pawan mtech
OUTPUT
ID NAME DEPT_NAME
-------- -------- --------------
1 harsh bsc
1 himanshu mca
2 anurag pharmacy
2 sushant msc
3 rohit biotech
4 anupam bsc
4 sachin medical
5 pawan mtech
8 rows selected.
OUTPUT
ID NAME DEPT_NAME
-------- -------- ---------------
1 harsh bsc
2 sushant msc
3 rohit biotech
4 anupam bsc
5 pawan mtech
1 himanshu mca
2 anurag pharmacy
3 rohit biotech
4 sachin medical
5 pawan mtech
10 rows selected.
ID NAME DEPT_NAME
---------- ---------- ----------
1 harsh bsc
2 sushant msc
4 anupam bsc
-----------------ENDING------------------
Shri Guru Ram Rai Institute of
Technology & Scienc e
Session :-2018
ASSIGNMENT BASED ON “SQL”
Submitted To Submitted By
Mr. Vaibhav Sushant Bounthiyal
Sharma Bsc.I.T. (4th Sem.)