select id,title,keywords,hits,intro,adddate,author,(select count(id) from 表2 where 表2.infoid=表1.id) as commenttotal from 表1 where 表1.deltf=0 and 表1.verific=1 order by commenttotal desc
select id,title,keywords,hits,intro,adddate,author,(select count(id) from 表2 where 表2.infoid=表1.id) as commenttotal from 表1 where 表1.deltf=0 and 表1.verific=1 order by commenttotal desc 以上语句在Access运行查询时总时提示"输入参数值commenttotal" 但如果不按commenttotal进行排序就不会出
select id,title,keywords,hits,intro,adddate,author,(select count(id) from 表2 where 表2.infoid=表1.id) as commenttotal from 表1 where 表1.deltf=0 and 表1.verific=1 order by (select count(id) from 表2 where 表2.infoid=表1.id)desc