且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

MySQL-选择与所有值匹配的记录

更新时间:2022-01-06 10:29:08

在提出建议之前,我应该先对此进行测试,但是呢:

I should test this first before suggesting, but what about:

SELECT DISTINCT tableA.column_A  
FROM XYZ AS tableA, XYZ AS tableB
WHERE tableA.column_A = tableB.column_A
    AND tableA.column_B = 'Value1'
    AND tableB.column_B = 'Value2'