Special data types in SQL SERVER

Following data types are not so frequently used in SQL Server. These are the special data types which are used only in specific cases.


Xml:  XML data type is used to hold xml data in SQL Server.

Timestamp ( or ) Rowversion: Timestamp or Rowversion is the data type which is used for maintaining the version numbers for the rows in a table. This is not generally used for the variable. RowVersion or TimeStamp data type is used only if data needs to be monitors for each DML operation. When ever any DML operation occurs on the table in which rowversion or timestamp data type is used, then automatically rowversion column number will be incremented.

Cursor: Cursor data type is used to fetch data from a table row by row.
Cursor is a special data type. This cannot used to create columns in a table. This data type should be used only to declare cursor type variable.

Sql_variant: sql_variant data type can store values of various SQL Server supported data types.That is a sql_variant data type column can hold int, char ,text etc., data. This data type can be used to define column data type,declare variables, input/output parameters to stored procedures etc., This data type can hold 8016 bytes of information.

Table:  Table data type is generally used in functions (user defined functions) which return Table as output.

Uniqueidentifier: This data type holds 16 bit GUID information. Uniqueidentifier stores the information in Hexa decimal format.

Hierarchyid: This data type stores the graphical information like organizational charts etc.,


Above data types are not so frequently used.So, much details about these data types are not provided in this article.

This entry was posted in . Bookmark the permalink.

Leave a reply