我有一ACCESS题库表,里面有 序号 |题干 |A选项 |B选项 |C选项 |D选项 |答案 这些字段,现在我想查出所有选项值在全表4个选项中唯一的题目,比如记录一,它的A选项是a,如果这个a在整个表的其余记录的4个选项中都未出现,那么它就是属于我要找的记录,请问这个SQL查询语句该怎么写?
我原来写了一条,发现效率超级低:
sql="select * from tiku where daan='A' and sa not in (select sa from tiku group by sa having count(sa)>1) and sa not in (select sb from tiku group by sb having count(sb)>1) and sa not in (select sc from tiku group by sc having count(sc)>1) and sa not in (select sd from tiku group by sd having count(sd)>1)"