Professional Documents
Culture Documents
Data Type means the type of data which users provided to a specific column
In SQL Server 2 types of data types available which includes
These Data types are used to provide numeric information for the columns, these
includes
TINYINT, SMALLINT, INT, BIGINT are called Exact Numerics where as REAL,
FLOAT are called Approximate Numerics.
String Data types:
These Data types are used to provide character information for the columns, these
includes
CHAR [(N)]: It is a fixed length data type, which occupies by default 1 byte memory.
When we N value then it occupies N bytes of memory where N is an integer. It follows
Static memory allocation process.
VARCHAR [(N)]: It is a variable length data type, which occupies by default 1 byte
memory. When we N value then it occupies N bytes of memory where N is an integer. It
follows dynamic memory allocation process.
Note : The Maximum limit for N is 8000,if it is more than 8000 characters we will use
TEXT or VARCHAR(MAX)
These data types are used to provide date oriented information to the columns,
these includes
These data types are used to provide miscellaneous information to the columns, these
includes
SMALLMONEY 4 BYTE
* MONEY 8 BYTES
IMAGE 16 BYTES
VARBINARY (MAX)Unlimited
1. SQL_VARIANT
1. Binary Data types: These stores binary values of a given string in ordered to hide
the original string values.
2. Unicode Data types: These Data types are used to store Unicode information,
these includes
When user create a data type then that data type is called user defined data type
Syntax:
Ex: