0% found this document useful (0 votes)
25 views

Dbms Experiment 3

The document contains SQL code to create a studentcourse table with course_id and roll_no columns, insert values into the table, and perform various types of joins (LEFT, RIGHT, FULL) between the studentcourse table and a student table to return the student name and course_id.

Uploaded by

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

Dbms Experiment 3

The document contains SQL code to create a studentcourse table with course_id and roll_no columns, insert values into the table, and perform various types of joins (LEFT, RIGHT, FULL) between the studentcourse table and a student table to return the student name and course_id.

Uploaded by

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

OFeedback O Help [email protected].

in v

SQL Worksheet
Clear Find Actions Save Run

10
11 create table student course (course id int, roll no int);
17 insert into studentcourse values (1,1);
13 insert into studentcourse values (2, 2) ;
1 insert into studentcourse values (2,3);
15 insert into studentcourse values (3,4);
16 insert into studentcourse values (1,5);
17 insert into studentcourse values (4,9) ;
18 insert into studentcourse values (5,10);
19 insert into studentcourse values (4,11);
20
21y SELECT Studentcourse. course id, student. name, student . age FROM
22 student
23 INNER JOIN studentcourse
24 ON student . roll no=studentcourse.roll no;
COURSE ID NAME AGE

1 harsh 18

1 harsh 18

1 harsh 18

2 pratik 19

2 pratik 19

2023 Oracle. Live SQL 23.1.5, running Oracle Database 19c EE Extreme Perf - 19.17.0.0.0
- Database Documentation Ask Tom Dev Gym
Built with using Oracle APEX - Privacy- Terms of Use
PFeedback O Help [email protected] v

SQL Worksheet Clear Find Actions v Save Run

1
create table studentcourse (course id int, roll_no int);
2 insert into studentcourse values (1,1);
3 insert into studentcourse values (2,2);
4 insert into studentcourse values (2,3);
5 insert into studentcourse values (3,4);
insert into studentcourse values (1,5);
insert into studentcourse values (4,9) ;
insert into studentcourse values (5,10);
insert into studentcourse values (4,11) ;
20
21, SELECT student.name, studentcourse. course id FROM
22 student
23 LEFT J0IN studentcourse
ON studentcourse. roll_no=student .roll_no;

NAME cOURSE_ID

harsh 1

harsh 1

harsh 1

harsh 1

nratik

2023 Oracde Live SQL 23.1.5, running Oracle Database 19c EE Extreme Perf - 19.17.0.0.0 -Database Documentation Ask Tom -Dev Gym
Built with using Oracle APEX- Privacy Terms of Use
O Feedback O Help [email protected] v

SQL Worksheet
lear Find Actions v 5 Save Run

1 create table student course (course id int, roll no int);


2 insert into studentcourse values (1,1);
3 insert into studentcourse values (2,2);
4 insert into studentcourse values (2,3);
5 insert into studentcourse values (3,4);
6 insert into studentcourse values (1,5);
7 insert into studentcourse values (4,9);
8 insert into studentcOurse values (5,10);
insert into studentcourse values (4,11);
20
21, SELECT Student. name,studentcOurse.cOurse id FROM
22 student
RIGHT JOIN studentcourse
24 ON studentcourse.roll_ no=student .roll no;

NAME cOURSE_ID

harsh 1

harsh

harsh 1

harsh 1

harsh 1

2023 Oracle- Live SQL 23.1.5, running Oracle Database 19c EE Extreme Perf- 19.17.0.0.0-Database
Documentation - Ask Tom Dev Gym
Built with using Oracle APEX Privacy- Terms of Use
PFeedback Help diksha,[email protected]

SQL Worksheet lear Find Actions 5 Save Run

10
11 create table student course (course id int, roll no int);
12 insert into studentcourse values (1,1);
13 insert into studentcourse values (2,2);
14 insert into studentcourse values (2,3);
15 insert into studentcourse values (3,4);
16 insert into student course values (1,5);
17 insert into studentcourse values (4,9);
18 insert into studentcourse values (5,10);
19 insert into studentcourse values (4,11);
20
21, SELECT Student . name, studentcourse.course id FROM
22 student
23 FULL JOIN studentcourse
24 ON studentcourse.roll no=student.roll no;

NAME COURSE ID

harsh 1

harsh 1

harsh 1

harsh 1

2023 Oracle Live SQL 23.1.5, running Oracle Database 19c EE Extreme Perf -
19.17.0.0.0- Database Documentation - Ask Tom Dev Gym
Built with using Oracle APEX- Privacy - Terms of Use

You might also like