MySQL Forums
Forum List  »  Quality Assurance

Re: connect two tables in mysql
Posted by: deepak m
Date: March 27, 2012 07:35AM

hi

By seeing the ERROR

constraint fails (`online hotel reservation system`.`room`, CONSTRAINT `room_ibfk_1` FOREIGN KEY (`Room Number`) REFERENCES `guest` (`Guest ID`)) ;

in your Guest table there is no Guest ID column, there is ID and Guest Number

specify the Reference column correctly, this may be the problem

or the table may contains the data already which violates the PK-FK condition

please ckeck for these two situation and let me know

Regards
Deepak M

Options: ReplyQuote


Subject
Views
Written By
Posted
5891
March 20, 2012 03:32AM
1503
March 30, 2012 01:02AM
Re: connect two tables in mysql
1911
March 27, 2012 07:35AM
1414
March 30, 2012 01:04AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.