I have 3 tables, College, Student and Result
create table college
(
clg_id int,
clg_name varchar2()50,
insert into college values(1,'GIFT');
insert into college values(2,'GITA');
insert into college values(3,'MIT');
create table student
(
clg_id int,
regno int,
sname varchar2(50)
)
insert into student values(1,10,sahar);
insert into student values(2,11,raj);
insert into student values(3,12,Payal);
insert into student values(3,13,Monalisha);
insert into student values(2,14,mary);
create table Result
(
clg_id int,
sname varchar2(50),
clg_name varchar2(50),
regno int,
dt date,
result varchar2(30)
)
insert into Result values(1,'sahar',10,'GIFT',20-02-1990,'A+');
insert into Result values(2,'raj',11,'GITA',21-02-1991,''B+);
insert into Result values(3,'monalisha',13,'MIT',22-09-2005,'A++');
insert into Result values(3,'payal',14,'MIT',22-09-2005,'C');
I want to give a particular dt and clg_id from the browser and to display the result, student name, college name and the regno on which date the result has been stored.
For example: I will enter clg_id = 3 and dt = 22-09-2005 then it should display:
 clg_name   sname      regno    result      
 MIT       monalisha   13        A++     
 MIT       payal        14       C      
I tried a lot... one of my attempts is
SELECT college.clg_name,student.sname,
student.regno result.result  FROM college,student,result
WHERE college.clg_id=student.clg_id=result.date;
but it's wrong... Please help.