Related basics of SQL Server usage

Source: Internet
Author: User

1. Management of tables-naming of tables and columns
    • Must start with a letter
    • Length cannot exceed 128 characters
    • Do not use reserved words for SQL Server
    • Only use the following characters A-z,a-z,0-9,$,#,_ and so on
2. Table Management--supported data types
    • Character type

Char fixed length, up to 8000 characters (non-Unicode encoding)

CHAR (10) has a length of 10 characters, and less space is used to complement the whole

varchar variable length, Max 8000 characters

varchar (10) Max 10 characters, length varies according to content, can save space

ntext the maximum length of a variable-length character Unicode data is 230~1 (1073741823) characters

Text variable-length character printable Unicode data with a maximum length of 231~1 (2147483647) characters

    • Digital type

Bit range 0-1

int range -231-(231-1)

bigint range -262-(262-1)

Float holds decimals, not recommended

Numeric decimal

Related basics of SQL Server usage

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.