IN A SQL SERVER WE CAN FIND MANY TYPES OF DATA:
1. STRINGS
- char [ ( n ) ]
Fixed-length, non-Unicode character data with a length of n bytes. n must be a value from 1 through 8,000. The storage size is n bytes. The ISO synonym for char is character.
- varchar [ ( n | max ) ]
Variable-length, non-Unicode character data. n can be a value from 1 through 8,000. max indicates that the maximum storage size is 2^31-1 bytes. The storage size is the actual length of data entered + 2 bytes. The data entered can be 0 characters in length. The ISO synonyms for varchar are char varying or character varying.
- nchar [ ( n ) ]
Fixed-length Unicode character data of n characters. n must be a value from 1 through 4,000. The storage size is two times n bytes. The ISO synonyms for nchar are national char and national character.
- nvarchar [ ( n | max ) ]
Variable-length Unicode character data. n can be a value from 1 through 4,000. max indicates that the maximum storage size is 2^31-1 bytes.
2.TIME DATE
Datetime its about date and time 4 byte for date and four for time
3)NUMBER
- decimal[ (p[ , s] )] and numeric[ (p[ , s] )]
Fixed precision and scale number When maximum precision is used, valid values are from - 10^38 +1 through 10^38 - 1. The ISO synonyms for decimal are dec and dec(p, s). numeric is functionally equivalent to decimal.
4)FLOATS
- float Depends on the value of n 8 OR 4 BYTES
- real 4Bytes
- 5) INTEGER
- bigint 8 Bytes
- int 4 Bytes
- smallint 2Bytes
- tinyint 1 Byte
......................ABOUT MONEY ...................
- money 8 bytes
- smallmoney 4 bytes
0 comments:
Post a Comment