oracle does not have an autoincrement.
it has the more powerfull concept of TRIGGERS
unfortunatelly you have to write them in pl/sql or java...
have a look on the net for oracle trigger tutorial or
you can
find a super oracle-feature-documentation here :
http://conf.php.net/oci2
PL/SQL code for an Oracle trigger that will auto-increment specified
field:
create or replace trigger trigger
before insert on table
for each row
begin
if :new.field is null then
select sequence-name.nextval into :new.field from dual;
end if;
end;
You have to create a sequence
2 matches
Mail list logo