TurboSQL Guide TurboSQL Column Types |
Previous Top Next |
These are the column types supported by TurboSQL.
AUTOINC
Syntax
AUTOINC(indication)
TurboDB Column Type
AutoInc
Description
Integer field which receives a unique number from the database engine. Field values of link columns in dependent tables are displayed according to the indication, which is a string containing an index definition. (See "Automatic Linking".)
Example
AUTOINC('LastName, FirstName')
BIGINT
Syntax
BIGINT [NOT NULL]
TurboDB Column Type
BigInt
Description
An integral number between –2^63 and +2^63–1
Example
BIGINT DEFAULT 4000000000
BIT
Not supported in TurboSQL.
BOOLEAN
Syntax
BOOLEAN [NOT NULL]
TurboDB Column Type
Boolean
Description
Possible values are TRUE and FALSE
Example
BOOLEAN DEFAULT TRUE
BYTE
Syntax
BYTE [NOT NULL]
TurboDB Column Type
Byte
Description
An integral number between 0 and 255
Example
BYTE NOT NULL DEFAULT 18
CHAR
Syntax
CHAR(n) [NOT NULL]
TurboDB Column Type
String
Description
Ansi string up to N characters long. 1 <= n <= 32767
Example
CHAR(40)
CURRENCY
Not supported in TurboSQL, use DOUBLE PRECISION or BIGINT.
DATE
Syntax
DATE [NOT NULL]
TurboDB Column Type
Date
Description
Date value between 1/1/1 and 12/31/9999
Example
DATE
DECIMAL
Not supported in TurboSQL, use DOUBLE PRECISION.
DOUBLE PRECISION
Syntax
DOUBLE [PRECISION][(p)] [NOT NULL]
TurboDB Column Type
Float
Description
Floating point number from 5.0e-324 to 1.7 x 10e308 with a precision of 12 signification digits. p is the number of displayed digits after the decimal point. 0 <= p <= 12.
Example
DOUBLE(4) NOT NULL
ENUM
Syntax
ENUM(value1, value2, value3, ...) [NOT NULL]
TurboDB Column Type
Enum
Description
Column that holds one of the enumeration values given stored as a number internally. The values must be valid identifiers up to 40 characters in length. There can be up to 15 values.
Example
ENUM(Red, Blue, Green, Yellow)
FLOAT
Not supported in TurboSQL, use DOUBLE PRECISION.
GUID
Syntax
GUID [NOT NULL]
TurboDB Column Type
Guid
Description
A universally unique identifier 16 bytes in size.
Example
GUID DEFAULT '12345678-abcd-abcd-efef-010101010101'
INTEGER
Syntax
INTEGER [NOT NULL]
TurboDB Column Type
Integer
Description
An integral number between –2.147.483.648 and +2.147.483.647
Example
INTEGER NOT NULL
LINK
Syntax
LINK(table_reference) [NOT NULL]
TurboDB Column Type
Link
Description
Holds value of AutoInc column of another table and such builds a one-to-many relationship. Table_reference is the name of referenced table. (See "Automatic Linking".)
Example
LINK(PARENTTABLE)
LONGVARBINARY
Syntax
LONGVARBINARY [NOT NULL]
TurboDB Column Type
Blob
Description
Long bit-stream containing arbitrary data up 2 GB
Example
LONGVARBINARY
LONGVARCHAR
Syntax
LONGVARCHAR [NOT NULL]
TurboDB Column Type
Memo
Description
Long Ansi string of variable length up to 2 G characters
Example
LONGVARCHAR
LONGVARWCHAR
Syntax
LONGVARWCHAR [NOT NULL]
TurboDB Column Type
WideMemo
Description
Long Unicode string of variable length up to 2 G characters
Example
LONGVARWCHAR
MONEY
Not supported in TurboSQL, use DOUBLE PRECISION or BIGINT.
NUMERIC
Not supported in TurboSQL, use DOUBLE PRECISION.
RELATION
Syntax
RELATION(table_reference)
TurboDB Column Type
Relation
Description
Holds any number of AutoInc values of another table. Used to create a many-to-many relationship. (See "Automatic Linking".)
Compatibility
Feature is not supported in TurboDB Managed 1.x.
Example
RELATION(PARENTTABLE)
TIME
Syntax
TIME[(p)] [NOT NULL]
TurboDB Column Type
Time
Description
Time of day with a precision of p, where p = 2 means minutes, p = 3 means seconds and p = 4 means milliseconds, the default being 3. The precision is available only in table level 4 and above; it is always set to 2 in tables up to level 3.
Example
TIME(4) DEFAULT 8:32:12.002
TIMESTAMP
Syntax
TIMESTAMP [NOT NULL]
TurboDB Column Type
DateTime
Description
Combined date and time with a precision of milliseconds between 1/1/1 12:00:00.000 am and 12/31/9999 11:59:59.999 pm
Examples
TIMESTAMP DEFAULT 23.12.1899_15:00:00
TIMESTAMP DEFAULT '5/15/2006 7:00:00'
VARCHAR
Syntax
VARCHAR(n) [NOT NULL]
TurboDB Column Type
String
Description
Same as CHAR
Example
VARCHAR(40)
VARWCHAR
Syntax
VARWCHAR(n) [NOT NULL]
TurboDB Column Type
WideString
Description
Same as WCHAR
Example
VARWCHAR(20) NOT NULL
SMALLINT
Syntax
SMALLINT [NOT NULL]
TurboDB Column Type
SmallInt
Description
An integral number between -32.768 and +32.767
Example
SMALLINT
WCHAR
Syntax
WCHAR(n) [NOT NULL]
TurboDB Column Type
WideString
Description
Unicode string up N characters long. The actual field size in bytes is twice the number of characters. 1 <= n <= 32767
Example
WCHAR(1000) DEFAULT '-'