且构网

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

SQL从具有多个where子句的一张表中进行选择

更新时间:2021-07-10 03:24:40

为了获得您正在寻找的数据,您需要在您的表上使用自联接:

In order to get the data you're looking for you will need to use a self-join on your table:

SELECT * FROM table t1
JOIN table t2
ON t1.Title = t2.Title
WHERE t1.Codes = '020'
AND t2.Codes = '021'