我有两张这样的 table
c_ID name
--- ------
7 a
6 a
5 a
4 d
并且
c_ID photo
----- ------
7 1
6 1
5 0
4 1
如何选择名称为 a
且照片为 1
的记录?
谢谢
最佳答案
select * /*TODO: Add specific column(s) you want here*/
from table1
join table2
on table1.c_ID = table2.c_ID
where table1.name = 'a'
and table2.photo = 1
关于mysql - 如何在我的条件下使用内连接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5449488/