[Summary -- Data Types in SQL Server]

Source: Internet
Author: User

Data Types in SQL Server

1. Exact numeric type
Bigint
Int
Smallint
Tinyint
Bit
Money
Smallmoney

2. Dense data type. We recommend that you use varchar (max) instead of text in ms.
Char
Varchar
Text

3. Approximate numeric type
Decimal
Numeric
Real
Float

4. Unicode string type
Nchar
Nvarchar
Ntext

5. binary data type. In ms, varbinary (max) is recommended to replace the image data type. max = 231-1
Binary (n) Stores fixed-length binary data
Varbinary (n) Stores variable-length binary data in the range of N ~ (1,8000)
Image Stores image information

6. Date and Time types, with different data ranges and exact differences
Datetime
Smalldatetime

7. Special Purpose Data Types
Cursor
SQL-variant
Table
Timestamp
Uniqueidentifier
XML

-----------------------------------------

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.