What is the "function" in Oracle equivalent to a "set Generator"?

Asked

Viewed 93 times

0

I’d like to know, what is the command on Oracle would be equivalent to

SET GENERATOR GEN_ID_TABELA TO 5;

(command made in FireBird)

Because I would like to create a script with the inserts, but to avoid errors in the application later, I believe that I must specify in which sequence/position to SEQUENCE this. (Example, I did 5 inserts on the table, then the SEQUENCE will be 5)

1 answer

1


According to the Oracle documentation the way to change the value would be to delete and then recreate with the start value you want.

DROP SEQUENCE GEN_ID_TABELA

CREATE SEQUENCE GEN_ID_TABELA
  START WITH 5;

Oracle documentation:

CREATE SEQUENCE

DROP SEQUENCE

ALTER SEQUENCE

  • So now I get it. It’s really different from Firebird. Thank you !

Browser other questions tagged

You are not signed in. Login or sign up in order to post.