Home | Previous Page | Next Page   System Catalog Tables >

SYSDEFAULTS

The sysdefaults system catalog table lists the user-defined defaults that are placed on each column in the database. One row exists for each user-defined default value. The sysdefaults table has the following columns.

Column Type Explanation
tabid INTEGER Code uniquely identifying a table
colno SMALLINT Code uniquely identifying a column
type CHAR(1) Code identifying the type of default value:
C = Current
L = Literal value
N = NULL
S = Dbservername or Sitename
T = Today
U = User
default CHAR(256) If sysdefaults.type = L, a literal default value
class (IDS) CHAR(1) Code identifying what kind of column:
T = table
t = ROW type

If no default is specified explicitly in the CREATE TABLE or the ALTER TABLE statement, then no entry exists for that column in the sysdefaults table.

If you specify a literal for the default value, it is stored in the default column as ASCII text. If the literal value is not of one of the data types listed in the next paragraph, the default column consists of two parts. The first part is the 6-bit representation of the binary value of the default value structure. The second part is the default value in ASCII text. A blank space separates the two parts.

If the data type of the column is not CHAR, NCHAR, NVARCHAR, or VARCHAR, or (for Dynamic Server) BOOLEAN or LVARCHAR, a binary representation of the default value is encoded in the default column.

A composite index on the tabid, colno, and class columns allows only unique values. (For Extended Parallel Server, this index omits the class column.)

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]