前10的sql
mssql:select top 10 * from 表 order by zje
mysql/sqlite:select * from 表 order by zje limit 10
Oracle:select * from (select * from 表 order by zje) where rownum<=10 order by rownum asc
后10的就是
mssql:select top 10 * from 表 order by zje desc
mysql/sqlite:select * from 表 order by zje desc limit 10
Oracle:select * from (select * from 表 order by zje) where rownum<=10 order by rownum desc
你控件,这个写法,mysql为例
select top 10 * from 表 order by zje ${if(控件名="前十","","desc")}