There is no such thing as "auto_increment" or "identity" columns in Oracle. However, you can model it easily with a sequence and a trigger:
Table definition:
CREATETABLE departments (
ID NUMBER(10)NOTNULL,
DESCRIPTION VARCHAR2(50)NOTNULL);ALTERTABLE departments ADD(CONSTRAINT dept_pk PRIMARYKEY(ID));CREATE SEQUENCE dept_seq;
Trigger definition:
CREATEOR REPLACE TRIGGER dept_bir
BEFORE INSERTON departments
FOR EACH ROWBEGINSELECT dept_seq.NEXTVAL
INTO:new.id
FROM dual;END;/