Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Autoincrement as Foreign Key

User_IIXJ5Nov 10 2022 — edited Nov 10 2022

Hello, in advance, im new to Apex. I created tables as follows:
CREATE TABLE TASKS(
TASKNAME Varchar(50),
TASK_ID Number(5) Primary Key
);
CREATE TABLE ASSIGNMENT(
USER_ID REFERENCES USERS(USER_ID),
TASK_ID REFERENCES AUFGABEN(TASK_ID)
);

Now I need your help: Does anyone know how to set "TASK_ID" as an autoincrement?
If i import data for the "TASKS"-Table, the foreign key in table "ASSIGNMENT" should count automatically, without loading data for this specific column.

Thanks for your help!

Comments
Post Details
Added on Nov 10 2022
1 comment
229 views