How to rename a column name in SQL Server 2000
How to rename ( change ) a column name in SQL Server 2000?
I tried the following queries... Its not working
atler table <table_name> change <old table name><new table name>
alter table<table_name> rename <old table name> to <new table name>
both change and rename keywords are not supporting.
Kindly send ASAP.
Thanks in advance,
Vishnu
Re: How to rename a column name in SQL Server 2000
please try this
EXEC sp_rename
@objname= 'table_name.old_column_name',
@newname = 'new_column_name',
@objtype = 'COLUMN'
Re: How to rename a column name in SQL Server 2000
Ya its working fine... thanks
I found one more solution... In enterprise manager, select the database-> diagrams and u can rename in that diagram by just clicking it...
Thanks,
Vishnu
Re: How to rename a column name in SQL Server 2000
That is for the GUI tool,the easiest option. What i suggested you is from command, which can also be called from any programming language / front end tool.