Click here to Skip to main content
15,030,238 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have the following tables in my Database System for which i have to create one-to-one relationship between Invoice and Payments. As only one payment occurs against one invoice of customer.
And MySQL doesn't allow one-to-one relationship, so what should i do to solve this.
Posted

1 solution

You can just add a foreign key in Payments that has the Invoice ID.

There is an example of something similar on this blog[^]
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900