Press "Enter" to skip to content

SQL Server 2000 Data Types

SQL Web Server 2000 Information Kinds

SQL Server needs that each variable and column in a table ought to be specified relative to the sort of information it will certainly keep. From a little bit to a big photo and binary storage space kinds, the allowance is intended to assist the customer comply with the information called for, and aid the engine allot area and handling rate effectively.

Integrated information kinds

SQL Server 2000 identifies the adhering to constructed in information kinds:

uniqueidentifier.
An around the world special identifier.

float.
Drifting accuracy number information from -1.79 E + 308 via 1.79 E + 308.

Usage smalldatetime information kind as opposed to datetime information kind, if you require to keep the day and time information from January 1, 1900 via June 6, 2079, with precision to the min.

Resources.
– Tutorial: SQL 7 & Database Files.
This is a beneficial tutorial on SQL & and data source Files.

With smallmoney. , if smallmoney.. Utilize the smallmoney datatype if your worth array is in between -214748.3648 and 214,748.3647.

Bigint, sql_variant, and table are brand-new to SQL Server 2000.

cash.
Monetary information worths from -2 ^ 63 via 2 ^ 63 – 1.

int.
Integer information from -2 ^ 31 via 2 ^ 31 – 1.

City NY/ NJ SQL Server Consultants.
We specialize is personalized data source software program. Call us for a complimentary appointment (973) 635 0080 or email us at paladn.com.

Information Types
Summary

nchar.
Fixed-length Unicode information with an optimum size of 4,000 personalities.

decimal.
Taken care of accuracy and range numerical information from -10 ^ 38 +1 with 10 ^ 38 -1.

binary.
Fixed-length binary information with an optimum size of 8,000 bytes.

varchar.
Variable-length information with an optimum of 8,000 personalities.

timestamp.
A database-wide serial number that obtains upgraded whenever.
a row obtains upgraded.

datetime.
Day and time information from January 1, 1753, with December 31, 9999,.
with a precision of 3.33 nanoseconds.

bigint
Integer information from -2 ^ 63 with 2 ^ 63-1.

sql_variant.
An information kind that shops worths of different information kinds,.
other than message, sql_variant, ntext, and timestamp.

arrow.
A recommendation to an arrow.

smalldatetime.
Day and time information from January 1, 1900, via June 6, 2079,.
with a precision of one min.

nvarchar.
Variable-length Unicode information with an optimum size of 4,000 personalities.

Like varchar.nvarchar to text/ntext whenever feasible since the message and photo areas are saved independently, which creates extra paging. Since the n kinds call for two times as much storage room, and like char/varchar to nchar/nvarchar information kinds. The n kinds are utilized mostly for unicode information.

You can make user-defined information kinds as well, which occasionally can be extra detailed of the worth kinds held in the things. These information kinds are based on the developed in kinds, and can be furnished with preprogrammed defaults, checks, restraints, and so on. SQL Server shops information in information web pages that are 8Kb (8192 bytes) in dimension. In you are utilizing integer information, information; think about that the tinyint datatype will certainly suit information which that will certainly fit right into one byte of storage space. And if If you require to save integer information from -2,147,483,648 with 2,147,483,647, make use of int information kind.

photo.
Variable-length binary information with an optimum size of 2 ^ 31 – 1 bytes.

In you are utilizing integer information, information; think about that the tinyint datatype will certainly suit information which that will certainly fit right into one byte of storage space. And if If you require to save integer information from -2,147,483,648 via 2,147,483,647, utilize int information kind.

smallint.
Integer information from -2 ^ 15 with 2 ^ 15 – 1.

Just how to select the suitable information kind.
SQL Server shops information in information web pages that are 8Kb (8192 bytes) in dimension. The system utilizes some of that s Sometimes, the system utilizes just 8060 bytes are availableto that are offered to save individual’s information. This can be achieved both by splitting the tables, and by selecting the tiniest information kind which that will certainly fit your information.

numerical.
Dealt with accuracy and range numerical information from -10 ^ 38 +1 with 10 ^ 38 -1.

tinyint.
Integer information from 0 via 255.

table.
An unique information kind utilized to save an outcome collection for later handling.

smallmoney.
Monetary information worths from -214,748.3648 with +214,748.3647.

ntext.
Variable-length Unicode information with an optimum size of 2 ^ 30 – 1 personalities.

– Information: Complete details on SQL.
This source gives full info on SQL.

varbinary.
Variable-length binary information with an optimum size of 8,000 bytes.

little bit.
Integer information with either a 1 or 0 worth.

char.
Fixed-length personality information with an optimum size of 8,000 personalities.

message.
Variable-length information with an optimum size of 2 ^ 31 – 1 personalities.

User-defined information kinds.
You can make user-defined information kinds as well, which occasionally can be extra detailed of the worth kinds held in the things. These information kinds are based on the developed in kinds, and can be furnished with preprogrammed defaults, checks, restraints, and so on.

real.
Drifting accuracy number information from -3.40 E + 38 with 3.40 E + 38.

sp_addtype datatypename, basedatatype, ‘NULL’/’ NOT NULL’.