SQL Server (2008) Creating link tables with unique rows
- by peteski22
Hi guys, I'm having trouble getting in touch with SQL Server Managemen Studio 2008! I want to create a link-table that will link an Event to many Audiences (EventAudience).
An example of the data that could be contained:
EventId | AudienceId
4 1
5 1
4 2
However, I don't want this:
EventId | AudienceId
4 1
4 1
I've been looking at relationships and constraints.. but no joy so far!
As a sneaky second part to the question, I would like to set up the Audience table such that if a row is deleted from Audience, it will clear down the EventAudience link table in a cascading manner.
As always, ANY help/advice appreciated!
Thanks
Pete