select s.name,s.rollno,s.subject,case when s.marks<30 then 'PASS' else 'FAIL' End from student s,Report r where s.Rollno=r.rollno and s.marks=r.marks
select name, rollno, subject, marks, case when marks >=50 then 'PASS' else 'FAIL' end from student s where exists ( select * from report r where r.rollno = s.rollno and r.marks = s.marks )
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)