How do I get rid of the "Invalid syntax near File. Expecting '.', ID, or QUOTED_ID"?
I'm trying to change over schema in a third party db. It's old. And开发者_C百科 everything has moved over except two lines.
ALTER SCHEMA dbo TRANSFER db_owner.File
ALTER SCHEMA dbo TRANSFER db_owner.User
Now I see that File and User are SQL keywords. And that's why I'm getting that error. Is there a way to tell SQL to ignore them as keywords? So it can run?
Enclose the keywords in square brackets.
ALTER SCHEMA dbo TRANSFER db_owner.[File]
ALTER SCHEMA dbo TRANSFER db_owner.[User]
精彩评论