2个表格查询并花费一个值

时间:2019-06-27 14:59:27

标签: mysql

2个杠铃查询并花一个子菜单和一个销售表的值 我想看一下subid 如果有条件的话

select l.,s.usubid 
from leadkamp as l,salekamp as s 
WHERE l.lastupdate>='2019-06-01 00:00:01' and 
      l.lastupdate<='2019-06-27 23:59:59' and 
      s.lastupdate>='2019-06-01 00:00:01' and 
      s.lastupdate<='2019-06-27 23:59:59' and 
      l.`user` = '2' and s.`user` = '2';

0 个答案:

没有答案