sql = "select top "+ ps+ " * from t_book where orderBy not in (select top "+ps*(pc-1)+" orderBy from t_book order by orderBy) "+whereSql+" order by orderBy";
其中ps是每页的记录数,pc是当前页码
运行时显示where附近有语法错误
求解答?
...全文
1138打赏收藏
SQL语句
sql = "select top "+ ps+ " * from t_book where orderBy not in (select top "+ps*(pc-1)+" orderBy from t_book order by orderBy) "+whereSql+" order by orderBy"; 其中ps是每页的记录数,pc是当前页码 运行时显示where附近有语法错误 求解答?
'ps' 附近有语法错误。 Query: select top ps * from t_book where orderBy not in (select top ps*(pc-1) orderBy from t_book order by orderBy) where 1=1 and cid = ? order by orderBy Parameters: [18]