SQL Statements
Constraint Name
The Constraint Name segment specifies the name of a constraint. Use the Constraint Name segment whenever you see a reference to a constraint name in a syntax diagram.
Syntax
Usage
The actual name of the constraint is an SQL identifier.
If you are using a nondefault locale, you can use characters from the code set of your locale in the names of constraints. For more information, see the Guide to GLS Functionality. 
When you create a constraint, the name of the constraint must be unique within the database if the database is not ANSI compliant.
When you create a constraint, the owner.name combination (the combination of the owner name and constraint name) must be unique within a database.
The owner.name combination is case sensitive. In an ANSI-compliant database, if you do not use quotes around the owner name, the name of the constraint owner is stored as uppercase letters. For more information, see the discussion of case sensitivity in ANSI-compliant databases on page 1-1049. 
References
See the CREATE TABLE statement in this manual for information on defining constraints.
Database Name
The Database Name segment specifies the name of a database. Use the Database Name segment whenever you see a reference to a database name in a syntax diagram.
Syntax
Usage
The simple database name is an SQL identifier, as described on page 1-966. If you are creating a database, the name that you assign to the database can be 18 characters, inclusive. Database names are not case sensitive. You cannot use delimited identifiers for a database name.
The maximum length of the database name, including dbservername, is 128 characters.
The following example shows a database specification:
If you are using a nondefault locale, you can use characters from the code set of your locale in the names of databases. For more information, see the Guide to GLS Functionality. 
@dbservername Option
If you use a database server name, do not put any spaces between the name and the @ symbol. For example, the following format is valid for the stores7 database on the training database server:
//dbservername/dbname Option
If you use the alternative naming method, do not put spaces between the quotes, slashes, and names, as the following example shows:
variable name Option
You can use a variable within an SQL API to hold the name of a database. 
References
See the CREATE DATABASE and RENAME DATABASE statements in this manual for information on naming databases.
|