Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more ➡
Download
Standard view
Full view
of .
Add note
Save to My Library
Sync to mobile
Look up keyword
Like this
7Activity
×
0 of .
Results for:
No results containing your search query
P. 1
SQL Server Data Type

SQL Server Data Type

Ratings: (0)|Views: 860|Likes:
Published by Jain ji
varchar, char, int, datetime, sql server data type, datatype
varchar, char, int, datetime, sql server data type, datatype

More info:

Published by: Jain ji on Aug 27, 2009
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, DOC, TXT or read online from Scribd
See More
See less

06/28/2011

pdf

text

original

 
String Data Type
Data type NameExplainStorage Size
Non-Unicode
char(n)Fixed-length string with Maximum 8,000 characters1 bytevarchar(n)Variable-length string withMaximum 8,000 characters
1 byte
varchar(max)Variable-length string with Maximum 1,073,741,824 characters TextVariable-length string with Maximum 2GB of text data or a maximumlength of 2^31 - 1 characters
 
Unicode
nchar(n)Fixed-length Unicode data with Maximum 4,000 characters
2 byte
nvarchar(n)Variable-length Unicode data with Maximum 4,000 characters
2 byte
nvarchar(max)Variable-length Unicode data with Maximum 536,870,912 characters
 
ntextVariable-length Unicode data. Maximum 2GB of text data or amaximum length of 2^30 - 1 characters
 
Numeric Data Type
tinyintAllow Integer data from 0 255.1 bytesmallintAllows whole numbers between -32,768 and 32,767 orfrom -2^15 through 2^15 - 12 bytesintAllows whole numbers between -2,147,483,648 and 2,147,483,647 orfrom -2^31 through 2^31 - 14 bytesbigintAllows whole numbers between -9,223,372,036,854,775,808 and9,223,372,036,854,775,807 orfrom -2^63 through 2^63-18 bytesdecimal(p,s)Fixed precision and scale numbers.Allows numbers from -10^38 +1 to 10^38 –1. The p parameter indicates the maximum total number of digits thatcan be stored (both to the left and to the right of the decimal point). pmust be a value from 1 to 38. Default is 18. The s parameter indicates the maximum number of digits stored to theright of the decimal point. s must be a value from 0 to p. Default valueis 05-17 bytes
 
PrecisionStorageSize
1 - 95 bytes10- 199 bytes20-2813 bytes29-3817 bytes
numeric(p,s)Fixed precision and scale numbers.Allows numbers from -10^38 +1 to 10^38 –1. The p parameter indicates the maximum total number of digits thatcan be stored (both to the left and to the right of the decimal point). pmust be a value from 1 to 38. Default is 18. The s parameter indicates the maximum number of digits stored to theright of the decimal point. s must be a value from 0 to p. Default valueis 05-17 bytes
 
PrecisionStorageSize
1 - 95 bytes10- 199 bytes20-2813 bytes29-3817 bytes
smallmoneyMonetary data from -214,748.3648 to 214,748.3647 4 bytesmoneyMonetary data from -922,337,203,685,477.5808 to922,337,203,685,477.58078 bytesfloat(n)Floating precision number data from -1.79E + 308 to 1.79E + 308. The n parameter indicates whether the field should hold 4 or 8 bytes.float(24) holds a 4-byte field and float(53) holds an 8-byte field. Defaultvalue of n is 53.
PrecisionStorageSize
7 digits4 bytes15 digits8 bytes
4 or 8 bytes
realFloating precision number data from -3.40E + 38 to 3.40E + 384 bytes

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->