Reputation: 183
I am trying to change the column name of a temp table. Other posts have suggested the format should be as follows, but it is not working. Any tips would be appreciated.
SP_rename '#subscriptions.PricePerSeat', 'PricePerSeat_original', 'Column'
Thanks!
Upvotes: 0
Views: 76
Reputation: 6586
Try this:
USE TEMPDB
Exec SP_rename '#subscriptions.PricePerSeat', 'PricePerSeat_original', 'COLUMN'
OR
Exec tempdb..SP_rename '#subscriptions.PricePerSeat', 'PricePerSeat_original', 'COLUMN'
Upvotes: 1
Reputation: 3615
Try this..
EXEC sp_RENAME '#subscriptions.PricePerSeat', 'PricePerSeat_original', 'COLUMN'
Upvotes: 0