SELECT a.m_no,a.u_name,a.u_name,a.c_address from userinfo a where a.m_no='2109260354' or a.m_no='2109260080'
select * from (SELECT m_no,count(id) from selldata where m_no='2109260354' or m_no='2109260080' GROUP BY m_no) b
以上两句均可正确运行,但用inner join后不行
SELECT a.m_no,a.u_name,a.u_name,a.c_address from m_jbxx a where a.m_no='2109260354' or a.m_no='2109260080' INNER JOIN (select * from (SELECT m_no,count(id) from m_data where m_no='2109260354' or m_no='2109260080' GROUP BY m_no) b) on a.m_no=b.m_no;
直接
SELECT a.m_no,a.u_name,a.u_name,a.c_address from m_jbxx a where a.m_no='2109260354' or a.m_no='2109260080' INNER JOIN (SELECT m_no,count(id) from m_data where m_no='2109260354' or m_no='2109260080' GROUP BY m_no) b on a.m_no=b.m_no;
也报错,麻烦指点