Here we will learn what are the miscellaneous data types in sql server, use of misc data types in sql server and different types of miscellaneous data types in sql server.
In SQL we have different datatypes which will not come under char datatypes, string datatypes, binary data types, date and time, numeric datatypes which we will call it as miscellaneous or other data types.
In SQL we have different type of miscellaneous data types are available those are
- cursor datatype
- xml datatype
- table datatype
- uniqueidentifier datatype
- sql_variant datatype
We can use this datatype to hold reference of cursor objects. Any variables created with cursor datatype are nullable and cursor datatype cannot be used for a column while creating table
Generally we will use this datatype to store xml formatted data in column. In xml datatype column we can store maximum of 2 GB data.
This datatype will be useful to store table result set in variable for processing later time. Table variables can be used in stored procedures, functions and these variable cleaned up automatically at the end of function or stored procedures.
This datatype is used to store globally unique identifier (GUID)
This datatype is used to store various SQL supported data types like int, char, binary, etc…
Please check following table for more details regarding miscellaneous data types
|cursor||It is used to store reference to cursor object|
|xml||It is used to store xml formatted data and we can store maximum 2GB data|
|table||It is used to store table result set for processing at a later time|
|uniqueidentifier||It is used to store globally unique identifier (GUID)|
|sql_variant||It is used to store values of various sql supported data types except text,ntext, varchar(max), xml, etc… We can store maximum of 8000 bytes|