-4

此表称为类别

我想选择 Sid=3 AND Bid =0 与 Sid=3 AND Bid=8 不重复的记录

(我想选择图片中的红色记录)

http://img27.imageshack.us/img27/8127/6opr.jpg

4

1 回答 1

2

您可以使用这样的子查询

SELECT * FROM Category WHERE Sid = 3 AND Bid = 0 
AND Name NOT IN (SELECT Name FROM Category WHERE Sid = 3 AND Bid = 8)
于 2013-06-25T22:36:16.363 回答