Change the sequence name of the item

Source: Internet
Author: User
Change the sequence name of the item

The following methods were used directly to query Chinese information:

Select * From tablename where fieldname like '% Chinese %'

However, no things can be found in the information query today, and there are indeed Chinese characters in the information space,
After checking the information, we found that we only need to add n before checking the information. The method is as follows:

Select * From tablename where fieldname like n' % %'

This is mainly caused by the sequential name of the database,
Generally, when we create a resource, the sequential names use "server preset value ",
So I seldom pay attention to it.

However, you only need to modify the checking statement method,
However, in order to make it easier for later login,
Therefore, we plan to change the database sequence name to "chinese_taiwan_stroke_ci_as ",
However, the SQL Server Enterprise Manager cannot be directly modified,
So we need to perform the manual action,
The signature method is as follows:

ALTER DATABASE DatabaseName SET SINGLE_USER WITH ROLLBACK IMMEDIATE
ALTER DATABASE DatabaseName COLLATE Chinese_Taiwan_Stroke_CI_AS
ALTER DATABASE DatabaseName SET MULTI_USER WITH ROLLBACK IMMEDIATE

Because when you change the sequence name, you must first set the information,
Therefore, in the first line, you must set the data source to single_user, and only one user can access the data source at a time,
Then modify the sequence name,
After modification, you can change the data source to multi_user,
In addition, you must first switch the information to the master.

 

PS: when the data volume is moved, the sequence between "cannot parse equal to job" latin1_general_ci_as_ks_ws "and" chinese_taiwan_stroke_ci_as "is displayed ." Changing the sequence ratio of the Data population is generally troublesome, the reason for this error must be that the order of the numbers used in the sentence in the SQL statement is inconsistent, generally, the sequence of the system data volume and user volume is abrupt, so you can exclude the system data volume burst.

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.