Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
shapper
Constraint Violating Yak Guru
450 Posts |
Posted - 2009-07-31 : 12:08:45
|
| Hello,I have 3 tables: Posts, Users and Subjects.Each User can be related to one or more Subjects so I created the table UsersSubjects.Each Post can be related to none or one Subject. How can I do this?I could add PostId on Subjects table but since I am also relating Subjects with Users this does not make any sense.Could someone tell me what would be the best way to create these relations?Thanks,Miguel |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
Posted - 2009-07-31 : 14:36:12
|
quote: Originally posted by X002548 Add SubjectId to the Post table and make it nullableEDIT: Slick Willy (wagging finger): "I did not have relations with that table..."Brett8-)
maybe so - but I'm guessing you inhaled.Be One with the OptimizerTG |
 |
|
|
|
|
|