日期:2014-05-20  浏览次数:20642 次

sql语句该怎么写才对??
我想从数据库里查找出日期最大的前五条信息出来,该怎么写?
我写的是:select * from news n where n.type=1 and n.date=(select max(n.date) from news ..........)
之后该怎么写才能得到前五条呢?
请过路高手指点?

------解决方案--------------------
要看你用的什么数据库了,mysql或者sql2000类的用top 5,oracle数据库在后面加上条件 and rownum<6