Dynamic SQL

Dynamic SQL used to run SQL's during runtime.. You are able to create the sql sentence inside a function an run it. Like this ;

 EXECUTE IMMEDIATE    'SELECT '
                           || seq_name
                           || '.NEXTVAL FROM dual'

seq_name is a variable that is passed inside our function.

Comments