Results 1 to 5 of 5

Thread: Changing a column name (MS SQL 2000)

  1. #1
    Join Date
    Jul 2004
    Posts
    106

    Changing a column name (MS SQL 2000)

    How can you change a Column name for MS SQL 2000 ?

    something like :

    ALTER TABLE [dbo].[MyTable]
    OldName RENAME NewName
    GO

    thank you

  2. #2
    Join Date
    Nov 2005
    Posts
    2

    Renaming a coloumn in SQL2K

    EXEC sp_rename 'Tablename.[oldColumn]','NewColumn','COLUMN'


    Thanks

    R.A.F

  3. #3
    Join Date
    Jul 2004
    Posts
    106
    with ' ?

    'COLUMN' looks strange but I try

    thank you

  4. #4
    Join Date
    Sep 2002
    Posts
    5,938
    That's the syntax, tells sql you want to rename column. You can use it to rename other kinds of object as well.

  5. #5
    Join Date
    Jul 2004
    Posts
    106
    I keep it somewhere thank you

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •