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 replace null values in expressions using isnull()?

0 Answers  


What is a non equi join?

0 Answers  


optimization techinques

0 Answers   Wipro,


What stored by the model?

0 Answers  


What is the difference between varchar and nvarchar datatypes?

0 Answers  






wat is mean by normalization?......programing defination i need...(i know basic defination)

4 Answers   Wipro,


What are the types of user defined functions in sql server?

0 Answers  


What is the purpose of update statistics and scope_identity() function?

0 Answers  


What are the filtered indexes?

0 Answers  


what is replication? where do u use Go Keyword?

1 Answers   Satyam,


How can we delete Duplicate row in table?

0 Answers   Wipro,


How would you choose between a clustered and a non-clustered index?

0 Answers  


Categories