SQL Data Types
esse quam videri
MSSQL and SQL99/92 Types
Here is a list of SQL Datatypes
MSSQL Data Type | SQL99/92 Data Type | Desc |
---|---|---|
bigint | none | int between -9,223,372,036,854,775,807 and 9,223,372,036,854,775,807 |
binary | binary | fixed length binary value up to 8000 bytes |
bit | bit | 1 or 0 |
char(n) | character | fixed length character data up to 8000 characters |
cursor | none | a cursor |
datetime | none | datetime from 1753-01-01 00:00:00 through 9999-12-31 23:59:59 |
decimal(p,s) | decimal | decimal up to 83 digits |
float | float | floating point number from -1.79E + 308 to 1.79E + 308 |
image | none | binary data up to 2,147,483,647 bytes in length |
int | integer | integer between -2,147,483,648 and 2,147,483,648 |
money | none | between -922,337,203,685,477.5808 and 922,337,203,685,477.5808 |
nchar(n) | national character | fixed length Unicode data up to 4000 characters |
ntext | none | Unicode text up to 1,073,741,823 characters in length |
numeric(p,s) | none | same as decimal |
nvarchar(n) | national character varying | varying length Unicode data up to 4000 characters |
real | none | floating point numbers between -3.40E + 83 and 3.40E + 38 |
rowversion | none | a unique number within a database that is updated whenever a row is updated. used to be timestamp. |
smalldatetime | none | datetime from 1753-01-01 00:00:00 through 2079-12-31 23:59:59 |
smallint | smallint | integers between -32768 and 32768 |
smallmoney | none | monetary values between -214748.3648 and 214748.3648 |
sql_variant | none | stores values of other types except text,ntext,rowversion and other variants |
table | none | stores results set |
text | none | large text passages up to 2,147,483,647 characters in length |
tinyint | none | int up to 255 |
unique-identifier | none | value that is unique across all databases and servers |
varbinary | binary varying | binary value up to 8000 bytes in size |
varchar(n) | character varying | text characters up to 8000 in length |