CLOSE SCHEMA

Purpose

Use this statement to close the current schema which affects the name resolution.

Prerequisite

None

Syntax

close_schema::=

Close Schema Statement

Usage Notes

If there is no schema opened, all the schema objects must be referenced using schema-qualified names (for more information, see SQL Identifier).

Example

OPEN SCHEMA my_schema;
SELECT * FROM my_table;
CLOSE SCHEMA;
SELECT * FROM my_table; -- Error: object MY_TABLE not found
SELECT * FROM my_schema.my_table;