SQL Server:

select top 8 * from stu_info  order by idx

MySQL:不支持top关键字

select * from `stu_info` order by idx desc limit 8