Question : SQL Exist

If the record not does not exist then the inner query equals false and does not return a result.

Does this mean that just that record will not be returned? Or does it mean that any other record which might have equalled true will also not be returned.

Basically is the true/false result related to the complete result set or the individual tuple?

Answer : SQL Exist

because your subquery in exists did not "join" to the outer query, aka did not correlate.
here the correct version:
1:
2:
3:
4:
5:
6:
7:
select * from cust
where exists
  (
     select null 
       from ord 
      where cust.id = ord.custd
  )
Random Solutions  
 
programming4us programming4us