Professional Documents
Culture Documents
In SQL Server, a column, variable, and parameter holds a value that associated with a
type, or also known as a data type. A data type is an attribute that specifies the type
of data that these objects can store. It can be an integer, character string, monetary,
date and time, and so on.
SQL Server provides a list of data types that define all types of data that you can use
e.g., defining a column or declaring a variable.
The following picture illustrates the SQL Server data types system:
Notice that SQL Server will remove ntext, text, and image data types in its future
version. Therefore, you should avoid using these data types and
use nvarchar(max), varchar(max), and varbinary(max) data types instead.
The following table illustrates the characteristics of the exact numeric data types:
varbinary 0 bytes 8000 bytes The actual length of data entered + 2 bytes
Data Type Lower limit Upper limit Memory
cursor for variables or stored procedure OUTPUT parameter that contains a reference to a
cursor
Spatial Geography store ellipsoidal (round-earth) data, such as GPS latitude and longitude coordinates.
type