How to change predefined column name to a new name.
eg: Column name is "Accounts"
I want to change it to "A/c"
alter table emp change Accounts….[What next]
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You need to use the sp_rename command, or use Management Studio to do it visually – make sure you do it at a quiet period, and make sure it has been done in pre-production first with testing!
Incidentally I would keep away from A/C – the slash sign is special meaning division.
The documentation for sp_rename is here, example B is most appropriate.
http://msdn.microsoft.com/en-us/library/ms188351.aspx