Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Renaming Columns

Author  Topic 

potchakri
Starting Member

10 Posts

Posted - 2007-08-08 : 09:32:11
Hi all,

I need to rename the Columns of a table in SQL Server 2005.
The table is consisting of nearly 200 columns and the requirement is that every column needs to be appended with a name that would be given by me.

Example:

Let the name of the table be "Applicationdata"
let it contain columns say

Name
DOB
Gender
Place
Qualification

now I need to add a code say "Appl" before every column so that after the code is run, the column names sholud be changed as

Appl_Name
Appl_DOB
Appl_Gender
Appl_Place
Appl_Qualification.

Do we have any procedure like that, if yes, please post it.

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2007-08-08 : 10:08:13
Do not cross post.
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=87523



CODO ERGO SUM
Go to Top of Page
   

- Advertisement -