1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

Rename a sequence

Discussion in 'SQL PL/SQL' started by UnixGuru, Mar 20, 2009.

  1. UnixGuru

    UnixGuru Active Member

    Messages:
    28
    Likes Received:
    1
    Trophy Points:
    90
    Hi, is it possible to rename a sequence? I don't think so, but if there is any method i am not aware of, would appreciate some help.

    Thanks
     
  2. orafan

    orafan Active Member

    Messages:
    23
    Likes Received:
    3
    Trophy Points:
    90
    hi just drop the sequence and create a new one and start from the desired value! simple
     
  3. tyro

    tyro Forum Genius

    Messages:
    368
    Likes Received:
    20
    Trophy Points:
    260
    Location:
    India
    no dropping and re-creating is not required just do
    Code (Text):

    rename old_sequence to new_sequence;
     
    oracle will say "table renamed" but that's fine, it will rename the sequence.
     
  4. UnixGuru

    UnixGuru Active Member

    Messages:
    28
    Likes Received:
    1
    Trophy Points:
    90
    hey tyro thanks.. that worked out