DATABASE & SQL/PLSQL

Data types in SQL Server
Previous Home Next

The data types is define below sre:

DtatypeRangeUsed to store
int -2^31 (-2,147,483,648) to & 2^31 - 1 (2,147,483,647) Integer data (whole numbers)
smallint -2^15 (-32,768) to 2^15 - 1 (32,767) Integer data
tinyint0 to 255Integer data
bigint-2^63 (-9,223,372,036,854,775,808) to 2^63-1 (9,223,372,036,854,775,807)Integer data
float-1.79E + 308 to 1.79E + 308Floatin precision data
money-2^63 (-922,337,203,685,477.5808) to 2^63 - 1 (+922,337,203,685,477.5807)Monetary data
smallmoney-214,748.3648 to +214,748.3647Monetary data
datatimeJanuary 1, 1753, to December 31, 9999Date and time data
smalldatatimeJanuary 1, 1900, to June 6, 2079Date and time data
char(n)n characters, where n can be 1 to 8000Fixed length character data
varchar(n)n characters, where n can be 1 to 8000Variable length character data
textMaximum length of 2^31 - 1 (2,147,483,647) charactersCharacter string
ntextMaximum length of 2^30 - 1 (1,073,741,823) charactersVariable length Unicode data
bit1 or 0 valueInteger data with 0 or 1
imageMaximum length of 2^31 - 1 (2,147,483,647) bytesVariable length binary data to store images
real-3.40E + 38 to -1.18E - 38Floating precision number
binaryMaximum length of 8,000 bytesFixed length binary data
varbinaryMaximum length of 8,000 bytesVariable length binary data
ncharMaximum length of 4,000 charactersFixed length Unicode data
nvarcharMaximum length of 4,000 charactersVariable length Unicode data
sql_varientMaximum storage size of8016 bytesContain rows of different datatypes except text, ntext, image, timestamp and sql_variant
timestampMaximum storage size of 8 bytesunique number in a database that get updated every time a row that contains it is inserted or updated
Previous Home Next

Tolal:0 Click:

Show All Comments

Did not find what you were looking for leave your name and message. We will revert within 24 hours
Name:
eMail:
Comment / Feedback: