SQL/MP Reference Manual
HP NonStop SQL/MP Reference Manual—523352-013
D-27
Example—DEFAULT
SYSTEM
specifies that the default value depends on the data type of the column:
NULL
specifies the null value as the default. Specifying NULL as the default adds two 
bytes to the size of the column.
You cannot specify NULL if you also specify the NOT NULL clause in the 
command that creates the column.
Example—DEFAULT
This example shows a CREATE TABLE statement that uses DEFAULT clauses to 
specify default values for three of the columns in the table:
CREATE TABLE ITEMS
 (ITEM_ID CHAR(12) NO DEFAULT,
 DESCRIPTION CHAR(50) DEFAULT NULL,
 NUM_ON_HAND INTEGER DEFAULT 0 NOT NULL,
 DATE_ADDED DATE DEFAULT CURRENT NOT NULL,
PRIMARY KEY ITEM_ID);
DEFINEs
A DEFINE is a named set of attribute-value pairs associated with a process. You can 
use DEFINEs to pass information to a process when you start the process. DEFINEs 
are often used to pass information about Guardian names.
NonStop SQL/MP allows you to use DEFINE names as logical names for tables, views, 
indexes, partitions, catalogs, collations, or Guardian files in SQL/MP statements. When 
SQL compiles such statements, it replaces the DEFINE name in the statement with the 
Guardian name currently associated with the DEFINE.
A DEFINE name begins with an equal sign (=) followed by a letter and can contain 2 to 
24 characters, including alphanumeric characters, hyphens (-), underscores (_), and 
circumflexes (^). Uppercase and lowercase characters are considered equivalent in 
DEFINE names.
These are reasons for using DEFINE names in SQL statements:
Data Type Default Value
Character
 Fixed-length A string of blanks
 Variable-length A zero-length string
Date-time Same as CURRENT option
Interval 0
Numeric 0










