Today's call Program Always reports an error when executing SQL statements. The final result is varchar and nvarchar. Depressed.
This problem is not solved, but the character string passed by the API user is incorrectly encoded, leading to garbled characters. Create Table [ Test ] (
[ Nn ] [ Varchar ] ( 50 ) Collate chinese_prc_ci_as Not Null ,
Constraint [ Pk_test ] Primary Key Clustered
(
[ Nn ]
) On [ Primary ]
) On [ Primary ]
Go
Select * From Test
Insert Into Test (NN)
Values (N ' BSS? Why? § ID ' )
Insert Into Test (NN)
Values (N ' BSS zookeeper» § ID ' )
/**/ /*
Server: Message 2627, Level 14, status 1, Row 1
The primary key constraint 'pk _ test' is violated '. Duplicate keys cannot be inserted in the object 'test.
The statement has been terminated.
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.