查看或更改數(shù)據(jù)庫的兼容性級別
當(dāng)前位置:點(diǎn)晴教程→知識管理交流
→『 技術(shù)文檔交流 』
sqlserver使用PIVOT時(shí)提示“附近有語法錯(cuò)誤。您可能需要將當(dāng)前數(shù)據(jù)庫的兼容級別設(shè)置為更高的值,以啟用此功能。有關(guān) alter DATABASE 的 SET COMPATIBILITY_LEVEL 選項(xiàng)的信息,請參見幫助?!?/p> 查看數(shù)據(jù)庫的兼容級別
USE AdventureWorks2022; GO select compatibility_level from sys.databases where name = 'AdventureWorks2022'; GO 更改數(shù)據(jù)庫的兼容級別
alter DATABASE AdventureWorks2022 SET COMPATIBILITY_LEVEL = 160; GO 該文章在 2023/10/25 15:43:09 編輯過 |
關(guān)鍵字查詢
相關(guān)文章
正在查詢... |