Enterprise Edition Home | Express Edition Home | Previous Page | Next Page   Other Syntax Segments >

Owner Name

The owner name specifies the owner of a database object. Use this segment whenever you see a reference to Owner Name in a syntax diagram. A synonym for owner name is authorization identifier.

Syntax

Read syntax diagramSkip visual syntax diagramOwner Name:
 
|--+- owner--+--------------------------------------------------|
   +-'owner'-+
   '-"owner"-'
 
Element Description Restrictions Syntax
owner User name of the owner of an object in a database Maximum length is 32 bytes Must conform to the rules of your operating system.

Usage

In an ANSI-compliant database, you must specify the owner of any database object that you do not own. The ANSI term for owner name is schema name.

In databases that are not ANSI-compliant, the owner name is optional. You do not need to specify owner when you create database objects or use data access statements. If you do not specify owner when you create a database object, the database server assigns your login name as the owner of the object, in most cases. For exceptions to this rule, see Ownership of Created Database Objects in CREATE FUNCTION and Ownership of Created Database Objects in CREATE PROCEDURE. When a DDL statement in an owner-privileged UDR creates a new database object, the owner of the routine (rather than the user who executes it, if that user is not the owner of the routine) becomes the owner of the new database object.

If you specify owner in data-access statements, the database server checks it for correctness. Without quotation marks, owner is case insensitive. The following four queries all can access data from the table kaths.tab1:

SELECT * FROM tab1;
SELECT * FROM kaths.tab1;
SELECT * FROM KATHS.tab1;
SELECT * FROM Kaths.tab1;
Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]