首页 新闻 会员 周边 捐助

sql语句查询

0
[已关闭问题] 关闭于 2011-10-14 17:33


declare @allcount int;select @allcount=count(1) from sg_ch_1_39 where fld_39_3=2 and chstatus=0 and chstep=0;select @allcount as allcount,sg_ch_1_39.createdate,sg_ch_1_39.chcontent,fld_39_3,sg_ch_1_6.chcode from sg_ch_1_6,sg_ch_1_39 where fld_39_3=2 and sg_ch_1_6.chstatus=0 and sg_ch_1_6.chstep=0 and sg_ch_1_39.chcode not in (select top 0 chcode from sg_ch_1_39 where chstatus=0 and chstep=0 order by sg_ch_1_39.chcode asc) and sg_ch_1_39.chcode in (select top 10 chcode from sg_ch_1_39 where chstatus=0 and chstep=0 order by chcode asc) and sg_ch_1_39.fld_39_2=6 order by sg_ch_1_6.chcode desc
这一段sql语句查询出来的一条数据,怎么显示了5条呢,不明其理,求解

云崖的主页 云崖 | 初学一级 | 园豆:151
提问于:2011-10-14 16:49
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册