Page 1 of 1

SQL: To get a count result, use the SET operator.

Posted: Wed Nov 09, 2022 7:20 am
by Mobo01
In SQL Developer, I'm attempting to acquire a count result by using the SET operator.
I need to determine how many instances of "attribute1" exist in "table name1" but not in "table name2."
Essentially, I want the same result as the following query, but with a SET operator.

Code: Select all

[code]SELECT count(distinct <attribute1>)
FROM <table_name1>
WHERE <attribute1> IS NOT (SELECT <attribute1>
                           FROM <table_name2>);
[/code]
I've looked through many Oracle manuals and other internet directories but haven't found satisfactory answers; could somebody kindly assist me?