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 |
Explain primary key, foreign key and unique key?
What are the different index configurations a table can have?
How can we write or define DDL statements in Sql server and DML statements?
Give a example to search fr a string in all stored procedure in sql server.
What are the types of resultset?
What is update locks?
how to get rank of diffrent student in same table based on newly inserted row in sql server2008
What is single-user mode and what are the steps you should follow to start sql server in single-user mode?
What are statistics, under what circumstances they go out of date, how do you update them?
Can you create a logon trigger in sql server 2005 express edition?
How to get the query of a table in sql server?
What are scalar functions in sql?