The EXISTS operator is used to test the existence of any record in a subquery and
returns true if the subquery returns one or more records.
SYNTAX-
SELECT column_name(s)
FROM table_name
WHERE EXISTS
(SELECT column_name FROM table_name WHERE condition);
FROM table_name
WHERE EXISTS
(SELECT column_name FROM table_name WHERE condition);
QUERY-
select account_name,account_city from account_master where exists(select acc_code from invoice_master where balance_amount>10000)
No comments:
Post a Comment