Answer the question
In order to leave comments, you need to log in
Error creating Foreign Key?
I want to create for the table "Hotel rooms" ( rooms
) a foreign key to the table "Room size" ( roomsize
).
I create through the phpmyadmin admin panel, the generated SQL query looks like this:
ALTER TABLE `rooms`
ADD CONSTRAINT `room_size`
FOREIGN KEY (`id_room_size`)
REFERENCES `hotel`.`roomsize`(`id_room_size`)
ON DELETE RESTRICT
ON UPDATE RESTRICT;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question