DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: rename a column?

Hybrid View

  1. #1
    Join Date
    May 2001
    Posts
    285
    Can we rename a column? I guess not. Here is what I am facing now -- I have a column with wrong name and a lot of data. Since I need to move those data into the right column, I plan to:

    1. Add a new column with the right name to the table.
    2. Move data from old column to the new one.
    3. Drop the old column.

    Is that right? What query can help me to accomplish #2 --- move data from old column to the new one?

    Let's assume the table is Contacts, and the old column is called Access, and new one is call AccessFlags.

    Thanks!

  2. #2
    Join Date
    Mar 2001
    Posts
    71
    To move data from one column to other, You can use

    Update contacts set accessFlags = access;

    HTH

    np70

  3. #3
    Join Date
    May 2001
    Posts
    285
    Cool! It works perfect! Thanks a lot!

Posting Permissions

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


Click Here to Expand Forum to Full Width