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 |
Can we use pragma autonomous_transaction in trigger?
Your sql server is running out of disk space. You notice that there are several large files with ldf extensions what are these files?
What are dml triggers and types of dml triggers?
What is de-normalization and what are some of the examples of it?
How will you add a dimension to cube? : sql server analysis services, ssas
How to create database with physical files specified in ms sql server?
Explain comment on transactions?
HOW TO FIND THE EMPLOYEE DETAILS WHO ARE GETTING SAME SALARY IN EMP TABLE
What is the recursive stored procedure in sql server?
How to know the NAME of the Database and SIZE of the Database at the client node in Sql Server 2005
What is the default fill factor value?
What is the use of toad or sqldbx.?
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)