如果是一张表,我们可以通过select x1,x2,(select count(*) from xxtable) as count
from xxtable得到每次查询总共有多少条记录,我现在有两张表连接查询如下,我也想知道根据条件每次查询的总记录条数,着个sql语句怎么写??select a.x1,a.x2,b.x3,x4
from xxtable1 as a,xxtable2 as b
where a.id=b.id and (orther conditions)
from xxtable得到每次查询总共有多少条记录,我现在有两张表连接查询如下,我也想知道根据条件每次查询的总记录条数,着个sql语句怎么写??select a.x1,a.x2,b.x3,x4
from xxtable1 as a,xxtable2 as b
where a.id=b.id and (orther conditions)
from xxtable1 as a,xxtable2 as b
where a.id=b.id and (orther conditions)
类似(select count(*) from xxtable) as count
的子句不就行了吗?
from xxtable1 as a,xxtable2 as b
where a.id=b.id and (orther conditions)