Forcibly obtain the next value of the sequence/current value (oracle function), oracle Function
Http://blog.csdn.net/qq525099302/article/details/47146393-
For more information about how to use a function to obtain the sequence value, see here.
-- Create or replace function get_seq_next (seq_name in varchar2) return numberis seq_val number; begin execute immediate 'select' | seq_name | '. nextval from dual 'into seq_val; return seq_val; end get_seq_next; -- create a function to obtain the next value of a sequence (You must obtain the next value before using it) create or replace function get_seq_curr) return numberis seq_val number; begin execute immediate 'select' | seq_name | '. currval from dual 'into seq_val; return seq_val; end get_seq_curr;
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.