我知道我可以通过以下过程实现我的目标:
- 创建新列
- 将新列从旧列中更新
- 删除旧列
我正在寻找一种用一个命令完成此操作的方法。 我知道 rename object
在表级别上起作用。例如,我可以这样做:
rename object Test.danPatient to dimPatient
但是这些方法都以不同的错误信息失败了:
rename object Test.dimPatient.City to Test.dimPatient.Town
rename object Test.dimPatient.City to Town
rename object DatabaseName.Test.dimPatient.City to Town
rename object DatabaseName.Test.dimPatient.City to DatabaseName.Test.dimPatient.Town
此外,根据这里所述,
sp_rename
在Azure Data Warehouse中不被支持。我尝试使用它的失败表明该网页是准确的。
我是否在尝试不可能的任务?