id_detail_item id_item id_detail_item_name
1 1 abc
2 1 abcd
3 1 cde
4 3 zki
5 3 zkr
如何检查同一个“id_item”中的“id_detail_item_name”是否有两个不同的数据?
我尝试了以下方法,但出现错误:
SELECT id_item FROM table_detail_item WHERE id_detail_item_name='abc' AND id_detail_item_name='abcd';