2.4. SQL SERVER 2K DATA TYPES

SQL Server supports a wide variety of native data types which may be used for column data type in a CREATE TABLE statement and for local variables and function return types. Virtually all SQL-92 data types are supported as well as a few additional ones as shown in Table 2-15.

Table 2-15. Data Types
T-SQL Data Type NameSQL-92General Comments Each type is described individually in the following sections.
BIGINT  
BINARY SQL-92 has BLOB (binary large object)
BITYesSQL-92 has a different BIT data type.
CHARYes
DATETIME SQL-92 has DATE and TIME
DECIMALYes 
FLOATYes 
IMAGE SQL-92 has BLOB (binary large object)
INTYes 
MONEY  
NCHARYes 
NTEXT  
NVARCHARYes 
NUMERICYes 
REALYes 
SMALLDATETIME  
SMALLINTYes 
SMALLMONEY  
SQL_VARIANT  
SYSNAME ...

Get Transact-SQL Desk Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.