按人员的升序排 取前面100名(分页,每个数据库都有不同)order by person.age ASC
楼上说的极是 ,你查询出来,按升序 order by age ASC ,只取前面100条记录 ,如果你想只返回100条数据 ,那么不同的数据库SQL也是不同的,SQL Server : select top 100 * from tablename order by age ASC ;ORACL : select * from tablename where rownum <= 100 order by age ASC ;其他的自己网上找找啦,上面给出的我也不确认对不对 ,自己试试了。
select top 100 * from tableName order by age Asc
是mysql数据库还是其他的,不同数据库可能实现方法不大一样,但是都是像楼上前辈所说,排序!
order by 搞定一切 如果很复杂的可以通过自己写数据库函数来搞定
mysql:select * from table order by age limit 100;
mysqlSELECT * FROM userinfo ORDER BY birthday DESC LIMIT 100
SQL Server : select top 100 * from tablename order by age ASC ;ORACL : select * from tablename where rownum <= 100 order by age ASC ; 很对
SQL Server : select top 100 * from tablename order by age ASC ;mysql:select * from table order by age limit 100;ORACL : select * from tablename where rownum <= 100 order by age ASC ; 学习勒
from tableName
order by age Asc
很对
学习勒