![]() ![]() ![]() |
Ispirer SQLWays Database Migration Software
BIT, IDENTITY and SMALLIDENTITY
BIT
Integer data type that can be 1 or 0. Integer values other than 0 or 1 are accepted, but are always interpreted as 1. Columns with a data type of BIT cannot be NULL.
If some BIT columns follow each other, they are saved in one byte, otherwise each BIT is stored in one byte.
IDENTITY
The IDENTITY data type is stored as a signed 4-byte INTEGER. IDENTITY is used to automatically assign the next highest value when a record is inserted into a table.
When an INSERT operation occurs for a record with ASCII zero in the IDENTITY field, the database engine assigns the next highest value.
SMALLIDENTITY
The SMALLIDENTITY data type is the same as the IDENTITY data type, except that a signed 2-byte integer (SMALLINT) is used to store SMALLIDENTITY values.
![]() ![]() ![]() |