摘要:
本文转自http://xudayu.blog.51cto.com/187984/86281感谢原作者1、选取最大的数select max(id) from tbltest42、选取最大的三个数select top 3 * from tbltest4 order by id desc3、选取第2大的数select top 1 a.* from (select top 2 * from tbltest4 order by id desc) a order by id asc或者select * from tbltest4 where id=(select max(id) from tbltest4 阅读全文