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

How to make a remote connection in a database?

0 Answers  


can an order by clause be used in a creation of a view?

0 Answers  


What are partitioned views and distributed partitioned views?

0 Answers  


What is the difference between for trigger and after trigger?

0 Answers  


What are the steps to take to improve performance of a poor performing query? : sql server database administration

0 Answers  






What is use of attribute hierarchy ordered ? : sql server analysis services, ssas

0 Answers  


How to create a dml trigger using create trigger statements?

0 Answers  


How to populate a table in sql server?

0 Answers  


What are the difference between data mart and data warehouse? : sql server analysis services, ssas

0 Answers  


what is a join and explain different types of joins? : Sql server database administration

0 Answers  


How to select an exiting database using mssql_select_db()?

0 Answers  


How can u get the number of pupils connecting the database?

1 Answers   Cap Gemini,


Categories