Other data types#
timestamp
rowversion
uniqueidentifier
sql_variant
timestamp and rowversion#
Is a data type that exposes automatically generated, unique binary numbers within a database. rowversion is generally used as a mechanism for version-stamping table rows. The storage size is 8 bytes. The rowversion data type is just an incrementing number and does not preserve a date or a time. To record a date or time, use a datetime2 data type. timestamp is an alias of rowversion which has been abandoned in SQL Server.
Example:
CREATE TABLE ExampleTable (Pkey int, VerCol rowversion);
uniqueidentifier#
Is a 16-byte GUID.
Example:
DECLARE @myid uniqueidentifier = NEWID();
SELECT CONVERT(char(255), @myid) AS 'char';
sql_variant#
A data type that stores values of various supported data types.