使用下面的command :
ALTER DATABASE my-db
MODIFY (SERVICE_OBJECTIVE = 'DW300')
但我明白了
Msg 103010, Level 16, State 1, Line 1 Parse error at line: 1, column: 16: Incorrect syntax near 'my'
用方括号转义给出:
Msg 103010, Level 16, State 1, Line 1 Parse error at line: 1, column: 16: Incorrect syntax near '[my-db]'
与单引号类似。我该怎么做?
最佳答案
此查询只能针对 Azure 服务器上的主数据库运行。
将上下文更改为 master 并重新运行成功。
关于azure - SQL Azure 数据仓库 - 当数据库名称包含连字符时如何在 SQL 中扩展,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47790165/