Below is my query which i’m trying to use,
select DISTINCT c.sno from Cards as c, reservation as r
where c.name='CRS-4-FC' AND c.sno != r.ssno;
This query is supposed to select only those sno from Cards which dont exist in the reservation table ie no sno is present in the column of ssno in reservation table. I put in
c.sno!=r.ssno
so that i dont choose all the sno. But when this query runs i get all the sno rather than those that are not reserved. Can someone help out where im going wrong..
try