www.openlinksw.com
docs.openlinksw.com

Book Home

Contents
Preface

SQL Reference

Datatypes
User Defined Types
XML Column Type
Identifier Case & Quoting
Wide Character Identifiers
Qualified Names
Qualifiers and Owners Default Qualifiers USE Statement, USE identifier
Literals, Brace Escapes
CREATE TABLE Statement
DROP TABLE Statement
CREATE INDEX Statement
DROP INDEX Statement
ALTER TABLE Statement
CREATE VIEW Statement
CREATE XML SCHEMA Statement
DROP XML SCHEMA Statement
Sequence Objects
INSERT Statement
UPDATE Statement
SELECT Statement
COMMIT WORK, ROLLBACK WORK Statement
CHECKPOINT, SHUTDOWN Statement
Stored Procedures as Views & Derived Tables
GRANT, REVOKE Statement
SET Statement
Best Effort Union
Standard and User-Defined Aggregate Functions
Virtuoso SQL Optimization
SQL Inverse Functions
SQL Grammar
Bitmap Indices

8.6. Qualified Names

8.6.1. Qualifiers and Owners

Virtuoso supports multiple namespaces for tables and procedures. A table or procedure is uniquely identified by a three part name consisting of qualifier, owner and name separated by dots.

Each connection has a current qualifier which is used as the default qualifier for if a name does not specify a qualifier. The owner can be omitted from a name if the qualifier and name uniquely identify the object, e.g. DB..SYS_KEYS.

Initially, all system objects have the qualifier DB and owner DBA.

The default current qualifier of all connections is DB unless otherwise specified using db.dba.user_set_qualifier.

A user can be assigned a default qualifier set as current qualifier upon login. This is done with the stored procedure db.dba.user_set_qualifier.

user_set_qualifier  (in user varchar, in qualifier varchar)

8.6.2. Default Qualifiers

The default qualifier of the user is set to be the qualifier. The names are strings and thus case sensitive.

Example:

db..user_set_qualifier ('U1', 'U1DATA');

8.6.3. USE Statement, USE identifier

This sets the default qualifier for the connection in question. The identifier cannot be an expression. The identifier is subject to whatever case conversions may be in effect.

See Also:

CaseMode Configuration parameter.

A quoted identifier will always pass in the case it is entered. An unquoted identifier will be converted to upper case if CaseMode so specifies.