日期:2014-05-18  浏览次数:20552 次

sqlserver查询难题
SQL code

String sql1="select top "+rowBegin+" ID from [user] where 1=1 "
     +str+"and loginName in(select loginName from record where records =? or records = ?  order by time desc" ;
String sql="select top 12 * from [user] where 1=1 "
     +str+"and loginName in(select loginName from record where records =? or records = ?) and ID not in (" +sql1+") order by time desc";




查询抱借,请各位大侠看下
,sql1 和sql是一样的.这是一个分页查询,rowBegin是个int参数

------解决方案--------------------
报什么错?貌似和刚才的帖子是一样的?