GoDaddy space SQL Server database No way to insert Chinese

Source: Internet
Author: User

The original code:

 Usestring007if exists(Select 1             fromsysobjectswhereId= object_id('k_v_test')             andType= 'U')   Drop Tablek_v_testGoCreate TableK_v_test (Temp                varchar( -) not NULL, Autoidint                  Identity, Key_nvarchar( -) not NULL, Value_nvarchar( $) not NULL,   constraintPk_k_v_testPrimary Key(autoid))GoInsert  intoK_v_test (Temp, Key_,value_)Values('Temp','Key','value')Insert  intoK_v_test (Temp, Key_,value_)Values('Temp','Key','value')Insert  intoK_v_test (Temp, Key_,value_)Values('Temp','Age',' -')Insert  intoK_v_test (Temp, Key_,value_)Values('Temp','Sex','male')Insert  intoK_v_test (Temp, Key_,value_)Values('Temp','Birthday','1986-')Insert  intoK_v_test (Temp, Key_,value_)Values('Temp','name','Zhang MoU')Insert  intoK_v_test (Temp, Key_,value_)Values('Temp','Mobile Phone','18888888888')GoSelect *  fromK_v_test

And then the Chinese that you see under execution will become '? ' ....  and then I searched the next ... That is, when the insert, when the character is in Chinese, add 'N' to the front ...  Sure enough ... For example:insert into k_v_test (tempvalues('temp  ', N' age ','+ ')

。。。。

Now the code:

 Usestring007if exists(Select 1             fromsysobjectswhereId= object_id('k_v_test')             andType= 'U')   Drop Tablek_v_testGoCreate TableK_v_test (Temp                varchar( -) not NULL, Autoidint                  Identity, Key_nvarchar( -) not NULL, Value_nvarchar( $) not NULL,   constraintPk_k_v_testPrimary Key(autoid))GoInsert  intoK_v_test (Temp, Key_,value_)Values('Temp','Key','value')Insert  intoK_v_test (Temp, Key_,value_)Values('Temp'N'Age',' -')Insert  intoK_v_test (Temp, Key_,value_)Values('Temp'N'Sex'N'male')Insert  intoK_v_test (Temp, Key_,value_)Values('Temp'N'Birthday','1986-')Insert  intoK_v_test (Temp, Key_,value_)Values('Temp'N'name'N'Zhang MoU')Insert  intoK_v_test (Temp, Key_,value_)Values('Temp'N'Mobile Phone','18888888888')GoSelect *  fromK_v_test

GoDaddy space SQL Server database No way to insert Chinese

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.