Progress
SQL-89
Guide and Reference
Data Types
When you define columns in a CREATE TABLE or ALTER TABLE statement, you must specify a data type for each new column. The data type determines the kind of data (such as characters, digits, or a date) that a column can store.
CHARACTER( n )
A character string of n characters. In interactive SQL, the length is used only to form the default display format (“ x ( n )”), since character values in Progress are variable-length. You can abbreviate CHARACTER to CHAR.
INTEGER
A whole number from -2,147,483,648 to 2,147,483,647, inclusive. You can abbreviate INTEGER to INT.
SMALLINT
Maps to the INTEGER data type.
DECIMAL [ ( m [ , n ] ) ]
A decimal number up to 50 digits long. The precision (m) specifies the number of significant digits. The scale (n) determines the number of digits to the right of the decimal point. The scale can be up to 10 digits (15 in ANSI mode). Progress/SQL truncates the value to the specified scale before storing it in the column. You can abbreviate DECIMAL to DEC.
FLOAT [ ( m ) ]
Maps to the DECIMAL data type. By default, the FLOAT data type receives a sliding point format.
DOUBLE PRECISION
Maps to the DECIMAL data type. The DOUBLE PRECISION data type receives a sliding point format.
DATE
A date from 1/1/32768 BC through 12/31/32767 AD. You must enclose DATE values within either single or double quotation marks. You can specify dates in this century with the format mm/dd/yy or with mm/dd/yyyy. Dates in other centuries require the format mm/dd/yyyy.
LOGICAL
Yes/no or true/false values.
REAL
Maps to the DECIMAL data type.
NUMERIC [ ( m [ , n ] ) ]
Equivalent to DECIMAL.
Progress/SQL rejects any violations of data type specifications. For example, you cannot insert a character-string value into a column defined as DECIMAL. Progress data typing restrictions are not as strict in ESQL. See the Progress Embedded SQL-89 Guide and Reference for more information.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |