SQL Server uses the N prefix

Source: Internet
Author: User

Executed on the serverCodeFor example, in a stored procedure or trigger, the Unicode String constant displayed must be prefixed with an uppercase letter N. This applies even if the referenced column has been defined as a unicode type. If the N prefix is not used, the string is converted to the default code page of the database. This may cause some characters not to be recognized.

 

Execute product_info @ name = n' chain'

The requirement to use the N prefix applies to the string constants generated on the server and the string constants sent from the client.

 

N is an explicit conversion of non-Unicode characters to unicode characters from the national (UNICODE) data type in the SQL-92 standard for extension and standardization.

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.