How can I change a view's name using sp_rename
?
The Microsoft Docs isn't clear enough for me.
I tried these two codes, but neither of them worked:
exec sp_rename 'dbo.priceMoreThan5', 'priceMoreThan10', 'VIEW
exec sp_rename @objname = 'dbo.priceMoreThan5', @newname= 'priceMoreThan10'