Click here to Skip to main content
15,896,726 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how can i create many to many relationship within a create table statement in MSSQL?
please give me an example at your earliest.
Posted

1 solution

To be precise, you can't properly define many-to-many relationship inside a single table definition. Typically many-to-many relationship is solved by adding a third, a junction, table. The purpose of this table is to hold information about all the joins between individual rows in the parent tables.

I would suggest reading:
- Many-to-many (data model)[^]
- Cardinality (data modeling)[^]

And if interested in more details, I would recommend reading An Introduction to Database Systems by C.J. Date[^]
 
Share this answer
 

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