filmov
tv
exists in sql | #sqlstarters

Показать описание
exists
exists will check whether any record is existed in subquery or not
exists will return true if subquery returns one or more records
select name from student where exists (select * from department where dept_id = 5)
exists will check whether any record is existed in subquery or not
exists will return true if subquery returns one or more records
select name from student where exists (select * from department where dept_id = 5)