【发布时间】:2011-12-31 03:06:38
【问题描述】:
我正在尝试查找只有一组确切收件人的所有对话。我的表格如下所示:
Conversation
---------------
id | some other fields
User
---------------
id | some other fields
Recipients
--------------
id | conversation_id | user_id | some other fields
1 | 1 | 1
2 | 1 | 2
3 | 2 | 1
4 | 2 | 2
5 | 2 | 3
6 | 3 | 1
7 | 3 | 3
使用上面的方法我想得到conversation_id 1,我唯一知道的是user_id的[1,2],但我不想要任何其他记录我将如何去做。
【问题讨论】:
标签: sql