Oracle uses sequences as for his identity columns, if we may say so.
If you have set a sequence for your table primary key, you also have to write a trigger that will insert the Sequence.NextValue or so into your primary key field.
Assuming that you are already familiar with this concept, simply query your sequence, then you will get your answer. What is very practiced in Oracle is to make yourself a function which will return an INT, then within your function, you perform your INSERT. Assuming that you have setup your trigger correctly, you will then be able to return the value of your sequence by querying it.
Here's an instance:
CREATE TABLE my_table (
id_my_table INT PRIMARY KEY
description VARCHAR2(100) NOT NULL
CREATE SEQUENCE my_table_seq
START WITH 1
INCREMENT BY 2
If you want to manage the auto-increment yourself, here's how:
INSERT INTO my_table (
) VALUES (my_table_seq.NEXTVAL, "Some description");
On the other hand, if you wish not to care about the PRIMARY KEY increment, you may proceed with a trigger.
CREATE OR REPLACE TRIGGER my_table_insert_trg
BEFORE INSERT ON my_table FOR EACH ROW
SELECT my_table_seq.NEXTVAL INTO :NEW.id_my_table FROM DUAL;
Then, when you're inserting, you simply type the INSERT statement as follows:
INSERT INTO my_table (description) VALUES ("Some other description");
After an INSERT, I guess you'll want to
or something like this to select the actual value of your sequence.
Here are some links to help:
Hope this helps!