Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: resetting sequence numbers

Re: resetting sequence numbers

From: Alexandre Gorbatchev <alexandre.gorbatchev_at_avermann.de>
Date: Fri, 05 Jul 2002 05:38:33 -0800
Message-ID: <F001.004902A3.20020705053833@fatcity.com>


this is probably the best way coz you wouldn't have you triggers, etc. invalidated. good trick. live and learn. :)
btw, that's good to temporarly revoke all the select privileges on sequence if you cannot guarantie that no one will select from it... or else this trick could play a bad joke.

Alexandre

  Its as simple as:

  get the most current value.
  alter the sequence to make the increment the negative value of that.   select from the sequence
  alter the sequence increment back to normal.

  If you need an example/specifics, email me direct.

  Joe

--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Alexandre Gorbatchev
  INET: alexandre.gorbatchev_at_avermann.de

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Fri Jul 05 2002 - 08:38:33 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US