Documente Academic
Documente Profesional
Documente Cultură
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
--------------------------------------
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
--------------------------------------
Table created.
Table created.
Table created.
d. course_student(regno, ccode):
Table created.
e. course_faculty(fid, ccode):
Table created.
1 row created.
SQL> insert into student values('19MCA1002','Raga',9.0);
1 row created.
1 row created.
1 row created.
1 row created.
1 row created.
1 row created.
1 row created.
1 row created.
1 row created.
1 row created.
1 row created.
1 row created.
1 row created.
d. values in student_course:
1 row created.
1 row created.
1 row created.
1 row created.
1 row created.
e. values in course_faculty:
1 row created.
1 row created.
1 row created.
1 row created.
1 row created.
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
------------------
REGNO CCODE
------------------ --------------------
19MCA1001 CSE2004
19MCA1002 CSE3002
19MCA1003 CSE3002
19MCA1004 CSE2004
19MCA1005 CSE1001
FID CCODE
------------- --------------------
FID1001 CSE2004
FID1002 CSE2004
FID1003 CSE3002
FID1004 CSE1001
FID1005 CSE2002
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-------------------
Q2.) List the faculty names with designation �Professor� who teaches CSE2004
[Natural Join and Explicit Inner Join]
USING NATURAL JOIN:-
FNAME
--------------------
Anand
sai
FNAME
--------------------
Anand
sai
Q3.) List the courses with more than 2 credits which was taught by the faculty
�Anand�
CNAME FNAME
-------------------- --------------------
networking Anand
database Anand
Q4.) List the students with >9 CGPA and has taken CSE3002 course taught by �Prof.
Sai�
Q5.) List the register number, name, course code, course name and faculty empid,
name involved in the course CSE1001
Q6.) List the students who have not registered any courses
SQL> select sname from student natural join course where cname='NULL';
no rows selected
FNAME COUNT(CCODE)
-------------------- --------------------------
Anand 2
sai 2
Q8.) List the name of the faculty along with the name of the course he/she handles
select fname,cname from faculty natural join course_faculty natural join course;
FNAME CNAME
-------------------- --------------------
Raman software engineering
Anand software engineering
Anand applied statistics
Vijay big data
Chandan neural networks
Sai machine learning
Sai neural networks
FNAME COUNT(CCODE)
-------------------- ------------
Anand 2
sai 2
rekha 1
Q10.) List the number of students who have registered for more than 10 credits
no rows selected