SQL Server field type description

Source: Internet
Author: User

Field Type

Description

Bit

0Or an integer of 1.

Int

 Integer number from-2 ^ 31 (-2,147,483,648) to 2 ^ 31 (2,147,483,647)

Smallint

 Integer number from-2 ^ 15 (-32,768) to 2 ^ 15 (32,767)

Tinyint

 Integer number from 0 to 255

 

 

Decimal

 Number of fixed precision and valid digits from-10 ^ 38 to 10 ^ 38-1

Numeric

DecimalSynonym

 

 

Money

 From-2 ^ 63 (-922,337,203,685,477.5808) to 2 ^ 63-1 (922,337,203,685,477.5807), the minimum unit of currency is 10 thousandth.

Smallmoney

 From-214,748.3648 to 214,748.3647 of monetary data, the minimum unit of currency is 10 points per cent.

 

 

Float

 Variable-precision numbers from-1.79e + 308 to 1.79e + 308

Real

 Variable-precision numbers from-3.04e + 38 to 3.04e + 38

 

 

Datetime

 The minimum time unit is 3% seconds or 3.33 milliseconds from the date and time data of January 1

Smalldatetime

 The minimum time unit is minute.

 

 

Timestamp

 Timestamp, a unique number of database widths

Uniqueidentifier

 Guid

 

 

Char

 Fixed Length non-Unicode bytes data with a maximum length of 8000

Varchar

 Variable Length non-Unicode bytes data, up to 8000

Text

 Non-Unicode bytes data with a maximum length of 2 ^ 31-1 (2g)

 

 

Nchar

 Bytes data with a fixed length of Unicode. The maximum length is 8000.

Nvarchar

 Extended Unicode bytes data, up to 8000

Ntext

 Variable-length Unicode bytes. The maximum length is 2 ^ 31-1 (2g)

 

 

Binary

 Fixed-length binary data, maximum length: 8000

Varbinary

 Variable-length binary data; maximum length: 8000

Image

 Variable-length binary data with a maximum length of 2 ^ 31-1 (2g)

 

Someone asked me this today, and put it here with a root, and then sent a link to the question.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.