Database Reference
In-Depth Information
Table 3.13
Commonly Used Data Types
Default
Length
Data Type
Description
Char
10
Fixed-length non-Unicode character data type with a maximum of
8000 characters.
Datetime
8
Date and time data from January 1, 1753, to December 31, 9999.
Decimal or
numeric
9
Fixed precision and scale numeric data type ranging from
−
10
38
+
1
to 10
38
−
1.
Float
8
Floating-precision number data type ranging from -1.79E
+
38 to
−
2.23E-38, 0 and 2.23E-38 to 1.79E
+
38.
Image
16
Variable-length binary data representing an image. The maximum
length is 2
31
-1 bytes.
Int
4
Integer data type ranging from -2
31
through 2
31
-1.
Money
8
Monetary data values from -2
63
to 2
63
-1 with accuracy to the
ten-thousandth of a monetary unit.
Tex t
16
Variable-length non-Unicode data type with a maximum of 2
31
-1
characters.
Varchar
50
Variable-length non-Unicode data type with a maximum of 8000
characters.
Ntext
16
Variable-length Unicode data with a maximum of 2
30
-1 characters.
Nchar
10
Fixed-length Unicode data with a maximum of 4000 characters.
Table
A special data type that can be used to store a result set for later
processing.
XML
The name of an xml schema collection.
Sql_variant
A data type that stores values of various SQL Server supported
data types (except text, ntext, image, timestamp, and sql_variant).
STUDENT
StudentID
FirstName
LastName
Major
FacultyID
Figure 3.6
STUDENT entity.