Miscellaneous Data Types in SQL Server with Examples

  Total Views : 549
  Comments : 0
 
  Keywords : SQL server miscellaneous data types, Different types of misc data types in sql server, SQL cursor data type, table data type, xml data type and other data types in sql server

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.

SQL Miscellaneous or Other Data Types

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

SQL Cursor 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 

Xml DataType in SQL Server

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.

Table DataType in SQL Server

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.  

Uniqueidentifier DataType in SQL Server

This datatype is used to store globally unique identifier (GUID)

sql_variant DataType in SQL Server

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

 

Data TypeDescription
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

 Comments (0)

Be the first to give your valuable feedback

Leave a comment

  • Default Tutlane User