Created
July 17, 2014 20:48
-
-
Save thiago-vieira/6286a86e656050211883 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare | |
l_MaxVal pls_integer; | |
l_Currval pls_integer default - 1; | |
begin | |
-- insert primary key and table name | |
select max(cod_os) | |
into l_MaxVal | |
from os; | |
while l_Currval < l_Maxval | |
loop | |
dbms_output.put_line (l_Currval); | |
-- insert sequence name | |
select seq_os.nextval | |
into l_Currval | |
from dual; | |
end loop; | |
end; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment