tipe data pada firebird

19 September 2012 08:43:56 Dibaca : 578 Kategori : 921411140tugas2

Data Types Conversion Table Firebird

MSSQL Ver

Data Type

Firebird

MSSQL definition and comments

6.5

bigint

INT64

8-byte integer type.

6.5

binary

CHAR

Fixed-length binary data with a maximum length of 8,000 bytes. In 6.5, maximum was 255.

6.5

bit

CHAR(1)

Integer data with either a 1 or 0 value. Typically, replaced by constants 'T' and 'F'.

6.5

char

CHAR

Fixed-length non-Unicode character data with a maximum length of 8,000 characters. In 6.5, maximum was 255. Firebird can hold up to 32,767 characters.

6.5

cursor

 

A reference to a cursor. This can only be used inside stored procedure or triggers; it cannot be used on table declarations.

6.5

datetime

TIMESTAMP

Date and time data from January 1, 1753, to December 31, 9999, with an accuracy of three-hundredths of a second, or 3.33 milliseconds.

6.5

decimal

DECIMAL

Fixed precision and scale numeric data from -1038 -1 through 1038 -1.

6.5

float

FLOAT

Floating precision number data from -1.79E + 308 through 1.79E + 308.

6.5

image

BLOB

Variable-length binary data with a maximum length of 231 - 1 (2,147,483,647) bytes.

6.5

int

INTEGER

Integer (whole number) data from -231 (-2,147,483,648) through 231 - 1 (2,147,483,647).

6.5

money

DECIMAL(18, 4)

Monetary data values from -263 (-922,337,203,685,477.5808) through 263 - 1 (+922,337,203,685,477.5807), with accuracy to a ten-thousandth of a monetary unit.

7

nchar

CHAR(x) CHARACTER SET UNICODE_FSS

Fixed-length Unicode data with a maximum length of 4,000 characters.

7

ntext

BLOB SUB_TYPE TEXT

Variable-length Unicode data with a maximum length of 230 - 1 (1,073,741,823) characters.

6.5

numeric

NUMERIC

In MS SQL, decimal and numeric are synonims.

7

nvarchar

VARCHAR(x) CHARACTER SET UNICODE_FSS

Fixed-length Unicode data with a maximum length of 4,000 characters.

6.5

real

DOUBLE

Floating precision number data from -3.40E + 38 through 3.40E + 38.

6.5

smalldatetime

TIMESTAMP

Date and time data from January 1, 1900, through June 6, 2079, with an accuracy of one minute. Firebird's has greater range and accuracy.

6.5

smallint

SMALLINT

Integer data from -215 (-32,768) through 215 - 1 (32,767).

6.5

smallmoney

DECIMAL(10, 4)

Monetary data values from -214,748.3648 through +214,748.3647, with accuracy to a ten-thousandth of a monetary unit. Note that Firebird's range is greater with this declaration.

2000

sql_variant

BLOB

Allows the storage of data values of different data types.

2000

table

none

Stores results temporarily for later user.

6.5

text

BLOB SUB_TYPE TEXT

Variable-length non-Unicode data with a maximum length of 231 - 1 (2,147,483,647) characters.

6.5

timestamp

INTEGER

A database-wide unique number. In Firebird, you will have to manage uniqueness through generators.

6.5

tinyint

SMALLINT

Integer data from 0 through 255. Firebird does not have such a small data type.

6.5

varbinary

CHAR

Variable-length binary data with a maximum length of 8,000 bytes.

6.5

varchar

VARCHAR

Variable-length non-Unicode data with a maximum of 8,000 characters. Firebird can hold up to 32,765 characters. In 6.5, maximum was 255.

7

uniqueidentifier

CHAR(38)

A globally unique identifier (GUID). In Firebird, you will have to generate the values with User-Defined Functions (UDFs).