I have a column in one of my tables which has square brackets around it, [Book_Category], which I want to rename to Book_Category.
I tried the following query:
sp_rename 'BookPublisher.[[Book_Category]]', 'Book_Category', 'COLUMN'
but I got this error:
Msg 15253, Level 11, State 1, Procedure sp_rename, Line 105 Syntax error parsing SQL identifier 'BookPublisher.[[Book_Category]]'.
Can anyone help me?