I wanted to rename my column.
I referred this document.
I wrote a query as:
sp_RENAME '[dbo].[File].[JSONFile]', '[ARAInputJson]', 'COLUMN'
But now column is created as [ARAInputJson]
But I don't want to put square brackets to it.
So again I wrote it as :
sp_RENAME '[dbo].[File].[[ARAInputJson]]' , 'ARAInputJson', 'COLUMN'
But I get this error :
Msg 15248, Level 11, State 1, Procedure sp_rename, Line 215
Either the parameter @objname is ambiguous or the claimed @objtype (COLUMN) is wrong.
Please help me to rename column from [ARAInputJson]
to ARAInputJson
.
This should solve your square bracket issue:
sp_RENAME 'dbo.File."[ARAInputJson]"' , 'ARAInputJson', 'COLUMN'
Well remove all those []
and try like
sp_RENAME 'dbo.File.[ARAInputJson]' , 'ARAInputJson', 'COLUMN'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With