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

0

I'd like to know, which command in 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 in order to avoid any errors in the application afterwards, I believe I should set the sequence / position to SEQUENCE . (Example, I made 5 inserts in the table, then the SEQUENCE will be 5)

    
asked by anonymous 19.05.2017 / 19:15

1 answer

1

According to Oracle's documentation the way to change the value would be to delete and then re-create 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

    
19.05.2017 / 21:30