Special data consists of data that does not fit any of the categories of data mentioned earlier such as binary data, character data, Unicode data, date and time data, numeric data and monetary data.
Microsoft® SQL Server™ includes four types of special data:
Is used to indicate the sequence of SQL Server activity on a row, represented as an increasing number in a binary format. As a row is modified in a table, the timestamp is updated with the current database timestamp value obtained from the @@DBTS function. timestamp data is not related to the date and time of an insert or change to data. To automatically record times that data modifications take place in a table, use either a datetime or smalldatetime data type to record the events and triggers.
Consists of either a 1 or a 0. Use the bit data type when representing TRUE or FALSE, or YES or NO. For example, a client questionnaire that asks if this is the client’s first visit can be stored in a bit column.
Consists of a 16-byte hexadecimal number indicating a globally unique identifier (GUID). The GUID is useful when a row must be unique among many other rows. For example, use the uniqueidentifier data type for a customer identification number column to compile a master company customer list from multiple countries.
Allows a user-defined data type, product_code, for example, that is based on the char data type and defined as two uppercase letters followed by a 5-digit supplier number.
bit | Using Data Types |
timestamp | Using Special Data |
uniqueidentifier | Using Uniqueidentifier Data |