select count(*)
from (select t.mechno,count(*)
from
(select * from boc_payinfo
where 1=1 and mechDate >= '20161001'
and mechDate <= '20161221'
and PROCSTATE = '04' and ACCCHECKSTATE = '02')
t, mp_merinfo m where t.mechno = m.mechno group by t.mechno)
[Err] 1248 - Every derived table must have its own alias
求大神说下,别名加在哪
就加载最后面就行了。。 你仔细看看()的位置嘛
select * from boc_payinfo
where 1=1 and mechDate >= '20161001'
and mechDate <= '20161221'
and PROCSTATE = '04' and ACCCHECKSTATE = '02'
select t.mechno,count(*)
from
(select * from boc_payinfo
where 1=1 and mechDate >= '20161001'
and mechDate <= '20161221'
and PROCSTATE = '04' and ACCCHECKSTATE = '02')
t, mp_merinfo m where t.mechno = m.mechno group by t.mechno
这两个查一下试试