i have that error and i dont know how to handle it in SQl ORA-02291: integrity constraint (SQL_VDITXCARYSZTRVANRYJTGPHNZ

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

i have that error and i dont know how to handle it in SQl ORA-02291: integrity constraint (SQL_VDITXCARYSZTRVANRYJTGPHNZ

Post by answerhappygod »

i have that error and i dont know how to handle it in SQl
ORA-02291: integrity constraint
(SQL_VDITXCARYSZTRVANRYJTGPHNZ.SYS_C0087921839) violated - parent
key not found ORA-06512: at "SYS.DBMS_SQL", line 1721
CREATE TABLE ticket(
ticket_no numeric(10) primary key,
booking_date date not null,
ticket_tybe varchar2(50) not null,
price numeric(10)not null,
flight_id varchar2(10)not null,
passenger_id numeric(10)not null,
foreign KEY (flight_id) references flight(flight_id),
foreign KEY (passenger_id) references
passenger(passenger_id));
desc ticket;
CREATE TABLE ticket_tax(
tax numeric(10) not null,
ticket_no numeric(10) not null,
foreign KEY (ticket_no) references ticket(ticket_no),
primary key(tax,ticket_no));
desc ticket_tax;
INSERT INTO ticket_tax
(tax , ticket_no )
VALUES
(90 , 0001 );
INSERT INTO ticket_tax
(tax , ticket_no )
VALUES
(195 , 0002 );
INSERT INTO ticket_tax
(tax , ticket_no )
VALUES
(90 , 0003 );
INSERT INTO ticket_tax
(tax , ticket_no )
VALUES
(195 , 0004 );
INSERT INTO ticket_tax
(tax , ticket_no )
VALUES
(90, 0005 );
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply