西西河

主题:【求助】mysql中2个表2个条件怎么写来做选择? -- 铁手

共:💬22 🌺13 新:
全看分页树展 · 主题 跟帖
家园 exists?

Select A.aa,A.bb,A.dd From A where (A.aa=12345) or exists (select * from A,B where A.aa=B.aa and B.cc=23456)

全看分页树展 · 主题 跟帖


有趣有益,互惠互利;开阔视野,博采众长。
虚拟的网络,真实的人。天南地北客,相逢皆朋友

Copyright © cchere 西西河