select count(*)如何和其他select语句写在一起

select count(*)怎么和其他select语句写在一起?我需要在多连接多线程下使用数据库,selectcount(*)fromtabl

select count(*)怎么和其他select语句写在一起?
我需要在多连接多线程下使用数据库,
select   count(*)   from   table   ;得到结果集的行数

select   *   from   table  
得到的最终结果数量是不是有可能不一致?
我需要select   *   from   table   执行后得到结果集的行数好分配内存存放结果集,能不能2句写成一个复合语句?

[解决办法]
select *,count=(select count(*) from table ) from table