Showing posts with label truethat. Show all posts
Showing posts with label truethat. Show all posts

Saturday, February 25, 2012

ALTER COLUMN NAME?

I'm starting to think that there is no way to simply ALTER a column name with
T-SQL. Is that true?
That means I need to do it in EM, where it will do all that ugly
drop/re-create table stuff?
Any help would be appreciated.
Hi
Yes, that is true.
Cheers
Mike
"Steve Z" wrote:

> I'm starting to think that there is no way to simply ALTER a column name with
> T-SQL. Is that true?
> That means I need to do it in EM, where it will do all that ugly
> drop/re-create table stuff?
> Any help would be appreciated.
|||Thanks...
"Mike Epprecht (SQL MVP)" wrote:
[vbcol=seagreen]
> Hi
> Yes, that is true.
> Cheers
> Mike
> "Steve Z" wrote:
|||> I'm starting to think that there is no way to simply ALTER a column name
with
> T-SQL. Is that true?
NO!
EXEC sp_rename 'tablename.old_column_name', 'new_column_name', 'COLUMN'
http://www.aspfaq.com/
(Reverse address to reply.)
|||Thank you very, very much - that is much neater...
"Aaron [SQL Server MVP]" wrote:

> with
> NO!
> EXEC sp_rename 'tablename.old_column_name', 'new_column_name', 'COLUMN'
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>
>