|SQL - Structured Query Language|
Special Data Types
Data Type is an attribute that defines type of data of an object in the SQL Server. Each Table Column, Program Variable, Expression and Parameter must be defines with unique data types to optimize database operation in the SQL Server.
SQL Server deployed with Exact Numerics, Approximate, Numerics, Data and Time, Character Strings, Unicode Character String, Binary Strings and Other System Data Types. SQL Server can deploy with Alias Data Types that are based on the system supplied data types. SQL Server can deploy with User Defined Data Types that can form and execute through .NET Programming Language.
Column name cannot define with Cursor in the SQL Server. Cursor data type is used to define Stored Procedure OUTPUT parameters. sp_cursor_list and sp_describe_cursor are system stored procedures that helps to find out cursor variable name.
A value of the hierarchyid data type is represents a position in a tree hierarchy database structure. hierarchyid should be update with unique value to make a relationship between hierarchy tables in the SQL Server System.
sql_variant is a generic data type that used to stores Numeric, String, Datetime and other data value in the SQL Server System. sql_variant can define in the columns, parameters, variables and return values of user-defined functions that support values of other SQL Server data types.
table is a special data type that used to stores a result set of a table-valued function to execute DML Query. The table variable can define in the batch, user-defined functions and stored procedure.
SQL Server does not support Index and Constraints to deploy with table data type. SQL Server does not generate parallel query execution plan for table data type.
Query execution should affect based on huge table variables, or complex queries or update query. Each table variables are automatically clean up after execute the batch, functions and stored procedure.
The timestamp is the synonym for the rowversion data type and is subject to the behavior of data type synonyms. The storage size is 8 bytes. Each table may have only one rowversion data type.
SQL Server 2008 is recommended to define rowversion data type instead of timestamp data type. The rowversion value is implicitly generated increment unique binary numbers within a database that used to maintain version-stamping table rows in the SQL Server.
The uniqueidentifier data type is used to stores system generated global unique id value in the table object. The GUID storage size is 16 bytes. The GUID value can generate through NEWID function in the SQL Server System.
ORDER BY clause cannot execute with GUID column value. SQL Server is support relational operators and IS NOT NULL operators to compare uniqueidentifier data value.
xml data type is used stores xml instances in a column or a variable in the SQL Server System. Up to 2 gigabytes xml data can access through SQL Server Database Engine.
* * * * *