Firebird Documentation Index → Firebird 2.5 Language Ref. Update → Data types and subtypes → BIGINT data type |
Find a more recent version at Firebird 5.0 Language Reference: BIGINT
Added in: 1.5
Description: BIGINT is the SQL99-compliant 64-bit signed integer type. It is available in Dialect 3 only.
BIGINT numbers range from -263 .. 263-1, or -9,223,372,036,854,775,808 .. 9,223,372,036,854,775,807.
Since Firebird 2.5, BIGINT numbers may be entered in hexadecimal form, with 9–16 hex digits. Shorter hex numerals are interpreted as INTEGERs.
Examples:
create table WholeLottaRecords ( id bigint not null primary key, description varchar(32) )insert into MyBigints values ( -236453287458723, 328832607832, 22, -56786237632476, 0x6F55A09D42, -- 478177959234 0X7FFFFFFFFFFFFFFF, -- 9223372036854775807 0xffffffffffffffff, -- -1 0x80000000, -- -2147483648, an INTEGER 0x080000000, -- 2147483648, a BIGINT 0XFFFFFFFF, -- -1, an INTEGER 0X0FFFFFFFF -- 4294967295, a BIGINT )The hexadecimal INTEGERs in the second example will be automatically cast to BIGINT before insertion into the table. However, this happens after the numerical value has been established, so
0x80000000
(8 digits) and0x080000000
(9 digits) will be stored as different values. For more information on this difference, see Hexadecimal notation for numerals, in particular the paragraph Value ranges.
Firebird Documentation Index → Firebird 2.5 Language Ref. Update → Data types and subtypes → BIGINT data type |