HOW TO RENAME A COLUMN NAME

Answers were Sorted based on User's Feedback



HOW TO RENAME A COLUMN NAME..

Answer / ravikv

SP_Rename 'dbo.table_name.column_name','new column_name'.

Is This Answer Correct ?    27 Yes 4 No

HOW TO RENAME A COLUMN NAME..

Answer / ram&saran

SP_RENAME '<table_name>.<old_column_name>','<new_column_name>'

Is This Answer Correct ?    1 Yes 2 No

HOW TO RENAME A COLUMN NAME..

Answer / praveen kumar.dandu

suppose we had a table name emp and columns ename and sal.

<sql>alter table emp rename column sal to salary;


it wll rename the column sal to salary

Is This Answer Correct ?    5 Yes 12 No

Post New Answer

More SQL Server Interview Questions

What are the different index configurations a table can have?

1 Answers  


Explain the phases a transaction has to undergo?

1 Answers  


What about UPDATESTATISTICS ?

2 Answers   HCL, Intelligroup,


What is a field in a table?

1 Answers  


You are doing log shipping due to some reasons it is failing. How you will proceed from there

1 Answers  


create index myindex on mytable(mycolumn) what type of index will get created after executing the above statement? : Sql server database administration

1 Answers  


how can you check the level of fragmentation on a table? : Sql server administration

1 Answers  


Which are the olap features?

1 Answers  


Is it possible to import data directly from t-sql commands without using sql server integration services? If so, what are the commands?

1 Answers  


how to delete duplicate rows in sql server2005

7 Answers   Cisco, CTS, HCL, IBM,


How to populate a table in sql server?

1 Answers  


What is the difference between a Application Server and a Database

3 Answers   Oracle,


Categories