Results 1 to 4 of 4

Thread: How to rename a column name in SQL Server 2000

  1. #1
    Junior Member
    Join Date
    May 2007
    Answers
    7

    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 change

    alter table rename to

    both change and rename keywords are not supporting.

    Kindly send ASAP.

    Thanks in advance,
    Vishnu


  2. #2
    Moderator
    Join Date
    Jun 2007
    Answers
    2,074

    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'


  3. #3
    Junior Member
    Join Date
    May 2007
    Answers
    7

    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


  4. #4
    Moderator
    Join Date
    Jun 2007
    Answers
    2,074

    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.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact