(Solved) : Using Oracle Create Relational Database Created Table Create Table Bookingcategory Reserva Q35630620
I am using oracle to create my relational database:
I created this table:
CREATE TABLE BookingCategory
ReservationNumber NUMBER (10) NOT NULL,
RoomCategoryID NUMBER (10) NOT NULL,
ReservationStatusCode NUMBER (10) NOT NULL,
CONSTRAINT RN_RC_PK PRIMARY KEY (ReservationNumber,RoomCategoryID),
CONSTRAINT ReservationNumber_FK FOREIGN KEY (ReservationNumber)REFERENCES Reservation (ReservationNumber),
CONSTRAINT RoomCategoryID_FK FOREIGN KEY (RoomCategoryID)REFERENCES RoomCategory (RoomCategoryID),
CONSTRAINT RSC_FK FOREIGN KEY (ReservationStatusCode) REFERENCESReservationStatus (ReservationStatusCode)
I am trying to use an UPDATE query, but it is giving me errors.I tried to drop the primary key but it also gave an error.
I also tried to drop the foreign key but it did not workeither.
This is my query:
SET ReservationStatusCode = 2,
WHERE ReservationNumber = 89981005;
How can i update this table?
What are my choices?
Why am i not allowed to update primary and foreign keys?
Write the queries that i should use!
Maybe i am typing something wrong.