UInt8-type column, which contains the single value 0 if the table or database does not exist, or 1 if the table exists in the specified database.
Subquery form
TheEXISTS operator checks whether a subquery returns any rows. It returns 0 if the subquery result is empty; otherwise, it returns 1.
You can use EXISTS in a WHERE clause. The subquery cannot reference tables or columns from the outer query.
Syntax
Query
Response
EXISTS in a WHERE clause with a subquery that returns several rows:
Query
Response
EXISTS returns 0:
Query
Response