Updating nextval in sequence in oracle

15 May

Let's say we want to execute the following PL/SQL code in our Perl script: BEGIN DBI.

TEST(: DNO,: CSR); END; The key to success lies in understanding what exactly is our REF cursor variable.

Using the OCI8 extension directly gives programmers maximum control over application performance.

Before starting this Oracle By Example, please have the following prerequisites completed: create sequence emp_id_seq start with 400; create trigger my_emp_id_trigger before insert on employees for each row begin select emp_id_seq.nextval into :new.employee_id from dual; end; / -- -- Also to simplify the example we remove this trigger otherwise -- records can only be updated once without violating the -- PYTHONHOL.

JHIST_EMP_ID_ST_DATE_PK constraint -- drop trigger update_job_history; -- -- Allow employees to be changed when testing the lab after hours.

Describing installation on Unix or Linux and omitting Windows or VMS would open me for the accusations of being OS biased.

As I really am biased toward one type of OS, I wanted to hide that fact and cover just the common parts.