Skip to main content
Skip table of contents

tableExists

This procedure checks if the table exists in the current virtual database. It simplifies the connector code by providing a simplified interface to accomplish a common task: check whether the table already exists in the current VDB. This procedure allows avoiding recurring code blocks that may introduce typos and errors.

Parameters

ParameterDescription
tableNameFully-qualified name of the table

Attributes

Attribute

Type

tableExists

boolean

 Example

SQL
BEGIN
    IF ((CALL UTILS.tableExists ('dwh.SampleTable')))
    BEGIN
        SELECT 'yes';
    END
    ELSE
    BEGIN
        Error 'no';
    END   
END;; 

The procedure encapsulates the query for the name of the current VDB and formats the table name with double quotes. This way, you need not worry about the correct casing of the schema and table names.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.