Background documentationEXISTS TABLE Statement (exists_table_statement) Locate this document in the navigation structure


An EXISTS TABLE statement (exists_table_statement) indicates whether or not a table exists.


Syntax Syntax

  1. <exists_table_statement> ::=
      EXISTS TABLE <table_name>
End of the code.

The specified table must be a base table, view table, or a synonym.

The existence or non-existence of the specified table is indicated by the return code 0 or by the error message -4004 Unknown table name .

A table only exists for a database user if the user has a privilege on this table.

More Information

Privileges: Overview