SQL Server Data type

Source: Internet
Author: User

Text type:

Char: fixed -length non- Unicode character data with a maximum length of 8,000 characters

VARCHAR: variable -length non- Unicode character data with a maximum length of 8,000 characters

Text: Store long text messages with a maximum length of 231-1 (2147483647) characters

NCHAR: fixed-length Unicode character data with a maximum length of 4,000 characters

NVARCHAR: variable-length Unicode character data with a maximum length of 4,000 characters

ntext: Storing long text messages up to 230-1 (1073741823) characters in length

Unicode is a character encoding scheme developed by international organizations that can accommodate all the words and symbols in the world.

The data type with n is twice times the length without n. For example, nchar (1) and char (2) are the same length

************************

Integer type:

int: occupies 4 bytes, can represent range: 2131 ~231-1 integer

************************

Exact number type:

Decimal:-1038 ~1038-1 between fixed precision and fractional numbers

Numeric: function equivalent to demical

notation: decimal (integers, decimals) and numeric (integers, decimals)

Default: If you do not specify a number of digits, the default 18-bit integer, 0-bit decimal

*************************

Date Type:

DateTime: Allowable range 1753-1-1 to 9999-1-1

smalldatetime: Permissible range 1900-1-1 to 2079-6-6

Time accuracy: datetime is accurate to 3/100 seconds; smalldatetime accurate to one minute

Appropriate description: 2013-08-20

Note: the date needs to be enclosed in single quotation marks (') when used

*************************

Bit type:

Bit: Indicates "yes/no" type data. (0,1/true,false)

SQL Server Data type

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.