From: "Kalen Delaney" <Kalen_Delaney@hotmail.com>
Subject: Re: Renaming a column
Date: 1999/02/02
Message-ID: <uHLgv5sT#GA.241@uppssnewspub05.moswest.msn.net>#1/1
References: <78meok$biv$1@nnrp1.dejanews.com> <GpXGNHAzhst2Mw6a@camk.demon.co.uk>
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Organization: Sound Software Services
Newsgroups: comp.databases.oracle.server,microsoft.public.sqlserver.server,comp.databases.ms-sqlserver


In MS SQL Server 6.5 7.0 you can rename a column with the sp_rename command:

exec sp_rename 'table.column', new_column_name

In MS SQL Server 7.0, you can alter the definition of a column with ALTER
TABLE

Please check the docs for the full syntax.

HTH

--
Kalen Delaney
MCSE, SQL Server MCT, MVP
(Please do not send email.
  Post all followups to the newsgroups.)

Andy Hardy wrote in message ...
>In article <78meok$biv$1@nnrp1.dejanews.com>, bastien.piroue@gsi-
>office.de writes
>>Hello,
>>
>>I want
>>a) to change the datatype of a column of a table
>>b) to change the name of a column of a table.
>>
>>I want this for Oracle7, Oracle8 and MS-SQL-Server 6.5 and MS_SQL - Server
 7.
>>The tables are in use, so that there are rows in it, that the alter table
>>alter column - command of ORACLE fails. Any tools, suggestions?
>
>Oracle fails because it does not have a rename column command. You'll
>need to drop and recreate, or possibley rename the old table and create
>a new view with the old tables name...
>
>Andy
>--
>Andy Hardy
>Senior IT Systems Engineer, Alstom Automation
>Tel: +44 1908 696200
>Fax: +44 1908 696225
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>Opinions are mine and do not necessarily reflect those of Alstom Automation
>




