views:

1201

answers:

1

Hi - I'm learning about table design in SQL and I'm wonder how to create a mapping table in order to establish a many-to-many relationship between two other tables?

I think the mapping table needs two primary keys - but I can't see how to create that as it appears there can only be 1 primary key column?

I'm using the Database Diagrams feature to create my tables and relationships.

+4  A: 

The easiest way is to simply select both fields by selecting the first field, and then while holding down the Ctrl key selecting the second field. Then clicking the key icon to set them both as the primary key.

samjudson