SQL Server data types

Source: Internet
Author: User

One or two binary data

Binary data is stored in 16 binary form.

Format: 1, binary (n) ———— a fixed-length n-byte binary data

2, varbinary (n) ———— n bytes Variable-length binary data

Ox24 ———— Where: Ox is a hexadecimal type, 24 is hexadecimal data

Second, character data

char (n) ———— character data type with a constant length of n

Three, String type

varchar (n) ———— the string type with a maximum length of n for a variable length. Save a few characters, such as name, login, password, etc., but no item can be longer than 8KB

does not contain string

Date Time Type: Fixed length of the data type

Datetime

smalldatetime

Five, shaping data types

bigint ———— (8B)

int ———— (4B)

smallint ———— (2B)

tinyint ———— (1B)

Six, floating-point type

Float ———— Small Precision

Decimal (p,s) ———— precision, accurate to four digits after the decimal point (p is the total number of digits is precision, S is the number of decimal places)

does not contain double

Seven, Boolean type

Bit

does not contain bool

Viii. type of currency

such as: money

Ix. type of text

The text ———— is used to store large text data of variable length, which can store 2GB

X. Image data Type

Image ———— in the database, to save the picture, try to save the picture path, do not store the picture directly

SQL Server data types

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.