/* 我自己也研究了下,下面的语句可以实现功能,但性能不佳 */
SELECT Name, Num FROM AAA WHERE Num = (SELECT MAX(Num) FROM AAA)
/* 求不用子查询的方法 */
------解决方案-------------------- 貌似你这个已经是最简单的了.
或者分两步走.
declare @num as int set @num = (SELECT MAX(Num) FROM AAA) select * from aaa where num = @num
------解决方案--------------------
------解决方案-------------------- 这样效率上不会有问题的
------解决方案-------------------- lz想多了
------解决方案-------------------- with temp as( SELECT MAX(Num) as max_num FROM AAA ) select AAA.* from AAA, temp where AAA.num = temp.max_num