我的sql语句是:
"select top 12 * from t_hesuan"+ whereSql + " and orderBy not in (select top ? orderBy from t_hesuan) order by orderBy";
sql不支持为select top ? 预编译 ,需要在?号加个括号就行。
"select top 12 * from t_hesuan"+ whereSql + " and orderBy not in (select top (?) orderBy from t_hesuan) order by orderBy";