Name

table_exists, table_type, key_exists — introspect the existence and kind of schema objects

Synopsis

integer table_exists( in tbl_name varchar);
 
varchar table_type( in tbl_name varchar);
 
integer key_exists( in tbl_name varchar,
  in key_name varchar);
 

Description

table_exists returns 1 if a table or view named tbl_name is present in the current schema and 0 otherwise.

table_type returns the kind of schema object identified by tbl_name. The result is one of TABLE, VIEW, or a system-defined type such as SYSTEM TABLE for known catalog objects.

key_exists returns 1 if key_name is defined on tbl_name and 0 otherwise. If tbl_name does not resolve to a known table, SQL error 42S02 (SR243) is raised.


© 1992 - OpenLink Software. All rights reserved.

Making Technology Work for You®