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 2000 Forums
 Transact-SQL (2000)
 alter column name

Author  Topic 

rrb
SQLTeam Poet Laureate

1479 Posts

Posted - 2003-01-23 : 21:59:48
There is a feature in Enterprise Manager
Which I apparently can't access in Query Analyzer
To change a column's name
Without dropping and readding the same
Oh, can someone help me out with this riddler!

Hi darlings, here's a quick one...

Got a schema (sourced elsewhere) which I've just noticed has a few columns named incorrectly. Can change the offending columns in EM but would prefer to write a script to modify them. Any clues?

--
I hope that when I die someone will say of me "That guy sure owed me a lot of money"

robvolk
Most Valuable Yak

15732 Posts

Posted - 2003-01-23 : 22:06:23
How about sp_rename?

Go to Top of Page

rrb
SQLTeam Poet Laureate

1479 Posts

Posted - 2003-01-23 : 22:09:58
Ah! I knew there had to be a way.

Thanks rob

--
I hope that when I die someone will say of me "That guy sure owed me a lot of money"
Go to Top of Page

ValterBorges
Master Smack Fu Yak Hacker

1429 Posts

Posted - 2003-01-23 : 23:44:58
Easy way to find these is to watch the sql profiler trace as you work with EM.

Or ask rob.

Edited by - ValterBorges on 01/23/2003 23:51:12
Go to Top of Page
   

- Advertisement -