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