0% found this document useful (0 votes)
24 views10 pages

Aniket DBMS-2

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views10 pages

Aniket DBMS-2

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

NAME: ANIKET

ROLL NO:2200291520035
DBMS LAB- 2
1. Display all the information of EMP table.

2. Display all the information of DEPT table.

3. Display unique Job from EMP table.


4. Display the details of SMITH.

5. Display unique department number with jobs.

6. List all the clerks.


7. Display the details of Blake.

8. List the empno, salary and commission of employees.

9. List the employees who joined before 1981.


10. List the employees who joined after the second half of 82.

Lab Exercise-2

QUERY 1: Create student table with the following


given structure: Query 2: Create faculty table with the following given
structure:

Column Data Size


Column Data Size
Name Type
Name Type
roll_no number 12
faculty_name varchar 20
name varchar2 20 2
semester number 6 faculty_id number 8
section varchar2 6 department varchar 10
branch varchar2 6 2
percentage number 6 Subject varchar 20
2
pcps number 6
city varchar2 15
contact_n number 10
o

Query 3: Insert following records into student table:

roll_no nam seme secti bra percen pc city contact


e ster on nch tage ps _no
11611 Abha 4 A IT 95 0 NOIDA 999911
3001 1100
11610 Piyus 4 B CSE 59 2 Ghazia 998911
3002 h bad 1100
11611 Shal 4 A IT 88 0 NOIDA 998911
3003 abh 1100
11610 Amit 4 B CSE 55 2 NOIDA 999911
3004 1101
11611 Anita 6 A IT 60 1 Ghazia 999911
3005 bad 1102
11610 Mee 6 B CSE 78 0 Ghazia 999911
3006 na bad 1103
11611 Ankit 6 A IT 75 0 NOIDA 999911
3007 a 1104

Query 4: Insert following records into faculty table:


faculty_name faculty_id department subjects
Galvin 0001 CSE Operating
System

Galvin 0001 CSE Computer


Network
Tanenbaum 0010 IT Data
Structures
Tanenbaum 0010 IT Object
Oriented
Vandana 0034 Maths MathematicsIII
Tanenbaum 0010 IT Computer
Organization
Ravi 0078 CSE Web
Technology

Query 5: Display all records of students.

Query 6: Display all records of faculty.

Query 7: Display names and percentage of all students.


Query 8: Display faculty and their departments.

Query 10: Display all faculty records of maths department.

Query 11: Display names of all students who scored more than 80 percent.
Query 12: Display names of Data Structures faculty.

Query 13: Display sorted list of students according to percentage scored by them.

Query 14: Eliminate the duplicate branch description when retrieving data from the branch column of student.

Query 15: Prof. Ravi has left the college. Delete records of Prof Ravi as it is no longer needed.
Query 16: Delete records of all students who are having pcps in more than one subject.

You might also like