SQL: Exists Condition
• •
The SQL EXISTS
condition is a boolean function that returns true if the condition is met. The syntax is pretty simple:
Alternatively, you can use NOT EXISTS(_subquery_)
. An example of the function is the following:
The query looks for all the tables that contain the column ACCOUNTID
and from those tables, only get the ones that don’t make reference to the constraint SYS_C00229824
.