SQL Server Knowledge continues to expand

Source: Internet
Author: User

1. Char, varchar, nvarchar difference

Char fixed length character data length 8000 characters, less than 8000 characters are filled with spaces.

varchar variable long character data maximum length 8000, less than 8000 characters are not filled with spaces.

nvarchar indefinite long Unicode character data, maximum character 4000.

When there is Chinese in the content should be used nvarchar or nchar because the Unicode character set is compatible with Chinese, when the system language region is not Chinese, if the Chinese stored in the varchar will appear garbled.

2. When to use NULL

The definition of a null value is an indeterminate value (which may be 1 or 200), a value that cannot be applied, and undefined. Null values should be used based on the meaning of NULL.

3. Differences in SQL Server Netlib

Namedpipes: communicates through named pipes. That is, accessed by computer name.

TCP/IP: Communicates over TCP/IP protocol. That is, directly through IP access.

Sharedmemory: Communication through shared memory. This should be used when the data service is local. This is the most efficient.

VIA: A fast but expensive communication solution, a specific virtual interface that the hardware vendor may support, is unclear.

4. SQL Server servers should not be exposed to the external network directly. You should only expose the Web application server to the external network. The Web application server accesses the database server through the intranet.

SQL Server Knowledge continues to expand

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.