Answer Posted / vishal
Rename a table using sp_rename
sp_rename <Old Table Name>, <New Column Name>
Rename a column using sp_rename
here as third argument we have to provide column. default
third argument for sp_rename is table.
sp_rename <table name>.<old Column Name>, <New Column Name>,
'column'
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
How to backup SQL Server Reporting Services ?
What is difference between global temporary tables and local temporary tables?
What are the different types of subquery?
Do you think BCNF is better than 2NF & 3NF? Why?
How do I find query history in sql server?
What are temporal tables in sql server 2016?
Why it is recommended to avoid referencing a floating point column in the where clause?
What is unique key constraint?
What is replication with database mirroring? : sql server database administration
Explain features of analysis services?
Can a unique index be created on a column, which contains null?
Difference between Inner vs outer joins?
Explain the categories of stored procedure i.e. System stored procedure, local stored procedure, temporary stored procedure, extended stored procedure, remote stored procedure?
Mention the command used to rename the database.
How to create function with parameter in sql server?