Rename Column
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: Rename Column

  1. #1
    Join Date
    Oct 2001
    Posts
    127
    Is it possible to rename a column in a Oracle table in 8i or 9i.
    Thanks

  2. #2
    Join Date
    Dec 2001
    Posts
    221
    create a new column . update it from first and drop it.
    Santosh Jadhav
    8i OCP DBA

  3. #3
    Join Date
    Jan 2002
    Location
    Netherlands
    Posts
    1,587
    NO!(until 8i atleast).
    Tarry Singh
    I'm a JOLE(JavaOracleLinuxEnthusiast)
    TarryBlogging
    --- Everything was meant to be---

  4. #4
    Join Date
    Mar 2001
    Location
    New York , New York
    Posts
    577
    undefine newname
    undefine oldname
    undefine ownername
    undefine tablename
    update SYS.COL$ c
    set c.NAME = '&&newname'
    where c.NAME = '&&oldname'
    and c.OBJ# in (select o.OBJ# from SYS.OBJ$ o, SYS.USER$ u
    where o.OWNER# = u.USER# and u.NAME = '&&ownername' and
    o.NAME = '&&tablename');


    btw its not supported by oracle :-)


    You will have to bounce the database after doing this for you to see the change


    Hope this Helps

    Ronnie
    ronnie_yours@yahoo.com

    You can if you think you can.

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