I need some example with SQL plus code on various SET operation. But the query have to be with SELECT keyword. For example I am giving a code:
Create table student (s_id number(4), sname varchar2(10),constraint pk_sid primary key (s_id),blood_gp varchar2(4)); create table location(l_id number(4),location varchar2(20),constraint pk_lid primary key(l_id)); create table studentlocation(s_id number(4),l_id number(4),constraint fk_ssid foreign key (s_id) references student(s_id),constraint fk_lsid foreign key (l_id) references location(l_id));
This is the tables of student, location and student location.
select student.sname student_name,location.location Location from student,location,studentlocation where student.s_id=studentlocation.s_id and location.l_id=studentlocation.l_id;
This query will return the result of Student name and their location based on the inserted data.
This exercise was given to us by the Venn diagram.
I need this type of more example so that I can do this type of query of my own.
Thank you all.