Naming

Name Resolution

Any table, view, or SQL procedure can be addressed using a qualified name, by prefixing the name of the object with the name of its containing schema, separated by a dot; e.g.:

1
<schema name>.<table/view name>

If these objects are referenced without a schema, they will be looked for in the user's default schema, if one has been assigned.

The default schema can be overridden within an ODBC/JDBC session by issuing the SET CURRENT SCHEMA command. Once set, the new schema will be used to resolve unqualified names instead of the default schema--the user's default schema will be ignored for the purposes of name resolution.

Naming Criteria

Each table and view is identified by a name, which must meet the standard naming criteria.

However, in SQL, a pound sign used at the beginning of a table/view name will automatically be replaced by the current user's username, followed by an underscore. This provides a shorthand way for a user to create & reference namespaced tables within a common schema.

For instance, if a user, auser, issues the following query:

1
SELECT * FROM auser_schema.#temp_table

The query will be translated into this and executed:

1
SELECT * FROM auser_schema.auser_temp_table

Reserved Words

For a list of the reserved words within Kinetica see SQL Reserved Word List.