-5

我有两张桌子。

table A
id
isReachEnd

table B
id
isFree

我需要获取所有满足下一个标准的 id:

((A.id = B.id) AND (A.isReachEnd = 1) AND (B.isFree = 1))

我能怎么做?

4

2 回答 2

2

这一点都不复杂——事实上,它非常简单。查询将只是

SELECT * FROM a, b WHERE a.id = b.id AND a.isReachEnd = 1 AND b.isFree = 1
于 2012-05-25T15:54:59.747 回答
1
SELECT *
FROM A, B
WHERE A.id = B.id AND A.isReachEnd = 1 AND B.isFree = 1
于 2012-05-25T15:57:46.640 回答