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

Machine-specific discussion
Unix, Linux, OS X, OS/2, Windows, ..?
Locked
Mobo01
Posts: 8
Joined: Thu Jun 23, 2022 8:57 am

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

Post 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?

Locked