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

<small id='3FiLK'></small><noframes id='3FiLK'>

  • <legend id='3FiLK'><style id='3FiLK'><dir id='3FiLK'><q id='3FiLK'></q></dir></style></legend>

      <bdo id='3FiLK'></bdo><ul id='3FiLK'></ul>
  • <tfoot id='3FiLK'></tfoot>

        了解 SQL Server 中的 COMPATIBILITY_LEVEL

        时间:2023-11-28
        <legend id='5AqUO'><style id='5AqUO'><dir id='5AqUO'><q id='5AqUO'></q></dir></style></legend>

          <tbody id='5AqUO'></tbody>
          1. <small id='5AqUO'></small><noframes id='5AqUO'>

                <bdo id='5AqUO'></bdo><ul id='5AqUO'></ul>
                <i id='5AqUO'><tr id='5AqUO'><dt id='5AqUO'><q id='5AqUO'><span id='5AqUO'><b id='5AqUO'><form id='5AqUO'><ins id='5AqUO'></ins><ul id='5AqUO'></ul><sub id='5AqUO'></sub></form><legend id='5AqUO'></legend><bdo id='5AqUO'><pre id='5AqUO'><center id='5AqUO'></center></pre></bdo></b><th id='5AqUO'></th></span></q></dt></tr></i><div id='5AqUO'><tfoot id='5AqUO'></tfoot><dl id='5AqUO'><fieldset id='5AqUO'></fieldset></dl></div>
              • <tfoot id='5AqUO'></tfoot>
                  本文介绍了了解 SQL Server 中的 COMPATIBILITY_LEVEL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我知道在您的原生数据库之前将数据库设置为 COMPATIBILITY_LEVEL 会阻止使用功能.然而,情况似乎并非如此.见证以下 SQL 脚本:

                  I understood that setting a database to a COMPATIBILITY_LEVEL prior to your native one prevented features from being used. However this doesn't seem to be the case. Witness the following SQL script:

                  CREATE DATABASE Foo
                  GO
                  USE Foo
                  GO
                  ALTER DATABASE Foo SET COMPATIBILITY_LEVEL = 80
                  GO
                  
                  CREATE TABLE Bar
                  (
                      Id UNIQUEIDENTIFIER NOT NULL,
                      TestNvcMax NVARCHAR (MAX) NOT NULL, -- Arrived in SQL 2005
                      TestDateTime2 DATETIME2 (7) NOT NULL -- Arrived in SQL 2008
                  )
                  GO
                  

                  但是这张桌子创造的很完美——有什么想法吗?我会认为某种错误消息或警告是合适的

                  But this table creates perfectly - any ideas? I would have thought some kind of an error message or warning would have been appropriate

                  推荐答案

                  在这里您可以阅读兼容性级别 80、90 和 100 之间的差异.更改数据库兼容级别

                  Here you can read about the differences between compatibility level 80, 90 and 100. ALTER DATABASE Compatibility Level

                  显然新数据类型不受影响.我认为兼容性级别是为了让 SQL Server 像旧版本一样表现",而不是阻止你做新的花哨的东西.

                  Apparently new data types is not affected. I think that compatibility level is there to make SQL Server "behave" like the older version, not prevent you from doing new fancy stuff.

                  这篇关于了解 SQL Server 中的 COMPATIBILITY_LEVEL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:varchar 值如何存储在 SQL Server 数据库中? 下一篇:SQL Server:一张表有 400 列还是 40 表有 10 列?

                  相关文章

                1. <tfoot id='eG0lz'></tfoot>
                  <legend id='eG0lz'><style id='eG0lz'><dir id='eG0lz'><q id='eG0lz'></q></dir></style></legend>

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

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