I have 2 tables given with variables:
SOURCE_TABLE_NAME STRING(10) := 'TABLE1';
TARGET_TABLE_NAME STRING(10) := 'TABLE2';
I need to write a stored procedure at Oracle 12 PL/SQL to copy some rows from SOURCE_TABLE_NAME
to TARGET_TABLE_NAME
.
Which way is it better to use?
- CURSOR
- SYS_REFCURSOR
- Any other ways?