SQL Server Datatypes

Like most RDBMSs, SQL Server 2000 supports different datatypes, in particular, the following:

Text Alphanumeric data that doesn't respond to arithmetic operators.

Numeric Numeric values stored with numeric characteristics and, most important, interpreted by arithmetic equations.

Image Usually a large file that can contain a graphic, text or numeric values, but is viewed as one container, regardless of its content.

Table 8.1 lists and describes the SQL Server 2000 datatypes.

Table 8.1: SQL SERVER DATATYPE

SQL Server

Description

Binary

Binary data up to 8000 bytes

Char

Text up to 8000 bytes

VarBinary

Variable-length binary up to 8000 bytes

VarChar

Variable-length character up to 8000 bytes

Bit

Integers 1 and 0 only (yes/no; true/false)

Bit Null

Bit that allows Null

DateTime

Valid date stored as 8 bytes

SmallDateTime

Valid date stored as 4 bytes

DateTime Null

DateTime that allows Null

Decimal

Fixed precision and scale numeric data from –1038 + 1 through 1038 – 1

Decimal Null

Decimal that allows Null

Real

Floating precision numeric data from –3.40E+38 through 3.40E+38

Float

Floating precision numeric data from –1.79E+308 through 1.79E+308

Real | Float Null

Real or Float that allows Null

Image

Variable-length binary data with a maximum length of 2,147,483,647 bytes

TinyInt

Value from 0 through 255

SmallInt

Integer data from –32,768 through 32,767

Int

Integer data from –2,147,483,648 through 2,147,483,647

TinyInt | SmallInt | Int Null

TinyInt, SmallInt, Int that allows Null

SmallMoney

Monetary data value from –214,748.3648 through 214,748.3647

Money

Monetary data value from –922,337,203,685,477.5808 through 922,337,203,685,477.5807

Money | SmallMoney Null

Money, SmallMoney that allows Null

NChar

Unicode character

NText

Unicode text

Numeric

Functionally equivalent to decimal

Numeric Null

Numeric that allows Null

NVarChar

Unicode variable-length character

Text

Text

VarBinary

Variable-length binary

VarChar

Variable-length character



Mastering Dreamweaver MX Databases
Mastering Dreamweaver MX Databases
ISBN: 078214148X
EAN: 2147483647
Year: 2002
Pages: 214

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net