SYSCS_UTIL.SYSCS_CHECK_TABLE system function

The SYSCS_UTIL.SYSCS_CHECK_TABLE function checks the specified table, ensuring that all of its indexes are consistent with the base table. If the table and indexes are consistent, the method returns a SMALLINT with value 1. If the table and indexes are inconsistent, the function will throw an exception.

Syntax SMALLINT SYSCS_UTIL.SYSCS_CHECK_TABLE(IN SCHEMANAME VARCHAR(128), IN TABLENAME VARCHAR(128))

An error will occur if either SCHEMANAME or TABLENAME are null.

Examples Check a single table: VALUES SYSCS_UTIL.SYSCS_CHECK_TABLE('SALES', 'ORDERS'); Check all tables: SELECT schemaname, tablename, SYSCS_UTIL.SYSCS_CHECK_TABLE(schemaname, tablename) FROM sys.sysschemas s, sys.systables t WHERE s.schemaid = t.schemaid;