1. <small id='BlBTu'></small><noframes id='BlBTu'>

        <i id='BlBTu'><tr id='BlBTu'><dt id='BlBTu'><q id='BlBTu'><span id='BlBTu'><b id='BlBTu'><form id='BlBTu'><ins id='BlBTu'></ins><ul id='BlBTu'></ul><sub id='BlBTu'></sub></form><legend id='BlBTu'></legend><bdo id='BlBTu'><pre id='BlBTu'><center id='BlBTu'></center></pre></bdo></b><th id='BlBTu'></th></span></q></dt></tr></i><div id='BlBTu'><tfoot id='BlBTu'></tfoot><dl id='BlBTu'><fieldset id='BlBTu'></fieldset></dl></div>
        <legend id='BlBTu'><style id='BlBTu'><dir id='BlBTu'><q id='BlBTu'></q></dir></style></legend>

      2. <tfoot id='BlBTu'></tfoot>
          <bdo id='BlBTu'></bdo><ul id='BlBTu'></ul>

        将 SQL Server 排序规则从区分大小写更改为不区分大小写?

        时间:2023-10-09

        <small id='PrESt'></small><noframes id='PrESt'>

          <tbody id='PrESt'></tbody>
            <i id='PrESt'><tr id='PrESt'><dt id='PrESt'><q id='PrESt'><span id='PrESt'><b id='PrESt'><form id='PrESt'><ins id='PrESt'></ins><ul id='PrESt'></ul><sub id='PrESt'></sub></form><legend id='PrESt'></legend><bdo id='PrESt'><pre id='PrESt'><center id='PrESt'></center></pre></bdo></b><th id='PrESt'></th></span></q></dt></tr></i><div id='PrESt'><tfoot id='PrESt'></tfoot><dl id='PrESt'><fieldset id='PrESt'></fieldset></dl></div>

                <legend id='PrESt'><style id='PrESt'><dir id='PrESt'><q id='PrESt'></q></dir></style></legend>
              1. <tfoot id='PrESt'></tfoot>
                  <bdo id='PrESt'></bdo><ul id='PrESt'></ul>
                  本文介绍了将 SQL Server 排序规则从区分大小写更改为不区分大小写?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我最近安装了 SQL Server 2008,并选择了排序规则区分大小写.我想让整个实例不区分大小写(而不是该实例中的数据库).如果我更改排序规则,它会影响任何现有的数据库吗?如果是,以什么方式?

                  I've recently installed SQL Server 2008 and I selected collation as case sensitive. I want to make it case insensitive for the entire instance (not for a database in that instance). If I change the collation does it affect any existing databases? if so in what way?

                  推荐答案

                  您基本上需要再次运行安装以使用新的排序规则重建 master 数据库.您不能以任何其他方式更改整个服务器的排序规则.

                  You basically need to run the installation again to rebuild the master database with the new collation. You cannot change the entire server's collation any other way.

                  见:

                  • MSDN:设置和更改服务器排序规则
                  • 如何更改数据库或服务器排序规则(在页面中间)
                  • MSDN: Setting and changing the server collation
                  • How to change database or server collation (in the middle of the page)

                  更新:如果要更改数据库的排序规则,可以使用此 T-SQL 片段获取当前排序规则:

                  Update: if you want to change the collation of a database, you can get the current collation using this snippet of T-SQL:

                  SELECT name, collation_name 
                  FROM sys.databases
                  WHERE name = 'test2'   -- put your database name here
                  

                  这将产生一个类似于:

                  Latin1_General_CI_AS
                  

                  _CI 的意思是不区分大小写"——如果你想区分大小写,用 _CS 代替:

                  The _CI means "case insensitive" - if you want case-sensitive, use _CS in its place:

                  Latin1_General_CS_AS
                  

                  所以你的 T-SQL 命令是:

                  So your T-SQL command would be:

                  ALTER DATABASE test2 -- put your database name here
                     COLLATE Latin1_General_CS_AS   -- replace with whatever collation you need
                  

                  您可以使用以下命令获取服务器上所有可用排序规则的列表:

                  You can get a list of all available collations on the server using:

                  SELECT * FROM ::fn_helpcollations()
                  

                  您可以使用以下命令查看服务器的当前排序规则:

                  You can see the server's current collation using:

                  SELECT SERVERPROPERTY ('Collation')
                  

                  这篇关于将 SQL Server 排序规则从区分大小写更改为不区分大小写?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:sql仅按顺序分组 下一篇:在 sql server 中检查文件是否存在?

                  相关文章

                • <legend id='0yhli'><style id='0yhli'><dir id='0yhli'><q id='0yhli'></q></dir></style></legend>

                    • <bdo id='0yhli'></bdo><ul id='0yhli'></ul>
                    <tfoot id='0yhli'></tfoot>
                    <i id='0yhli'><tr id='0yhli'><dt id='0yhli'><q id='0yhli'><span id='0yhli'><b id='0yhli'><form id='0yhli'><ins id='0yhli'></ins><ul id='0yhli'></ul><sub id='0yhli'></sub></form><legend id='0yhli'></legend><bdo id='0yhli'><pre id='0yhli'><center id='0yhli'></center></pre></bdo></b><th id='0yhli'></th></span></q></dt></tr></i><div id='0yhli'><tfoot id='0yhli'></tfoot><dl id='0yhli'><fieldset id='0yhli'></fieldset></dl></div>
                  1. <small id='0yhli'></small><noframes id='0yhli'>