ALTER TABLE [TEMP]
SP_RENAME '[TEMP].[Day]', 'GT', 'COLUMN'
I am trying to rename Day to GT and am getting the error
Incorrect syntax near 'SP_RENAME'
SQL Server Management Studio says the error is on SP_RENAME
NOTE: I'm open to other options besides sp_rename
SP_RENAME is not part of the ALTER TABLE statement. It is a system stored procedure and therefore it should be invoked using the EXEC/EXECUTE statement, like this:
exec SP_RENAME '[TEMP].[Day]', 'GT', 'COLUMN'
(without the alter table temp bit)
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