how to rename the table
Answers were Sorted based on User's Feedback
Answer / rajkumar
SP_RENAME 'OLDTABLE NAME', 'NEW TABLE NAME'
eg:
SP_RENAME 'TBL_EMPLOYEE', 'TBL_EMP'
| Is This Answer Correct ? | 11 Yes | 3 No |
Answer / 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 |
Answer / mohan
Rename a table
This example renames the customers table to custs.
EXEC sp_rename 'customers', 'custs'
B. Rename a column
This example renames the contact title column in the
customers table to title.
EXEC sp_rename 'customers.contacttitle', 'title', 'COLUMN'
| Is This Answer Correct ? | 0 Yes | 2 No |
How to get a list of columns using the "sys.columns" view in ms sql server?
Do you know what are pages and extents? : SQL Server Architecture
Write an SQL query to obtain the 2nd highest salary.
0 Answers Akamai Technologies,
What is the default value of an integer data type in sql server 2005?
Why should we go for stored procedures? Why not direct queries?
Does full backup break log chain?
What is the main purpose of having conversation group?
Explain about integration services of Microsoft SQL server?
What are system databases into sql server (2005/2008)?
What are ddl triggers and types of ddl trigger?
How to create stored procedures with parameters in ms sql server?
What is the order by used for?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)