日期:2014-05-18 浏览次数:20594 次
select top 1 id from tablename order by date desc
------解决方案--------------------
select top 1 id from 表 order by date desc
------解决方案--------------------
select *
from tb
where rowid = 1
order by date desc
??? ORACLE不是很懂,建议去ORACLE板块。
------解决方案--------------------
select top 1 id from tablename order by date desc
还有其他列的话还可以使用row_number()over()实现
------解决方案--------------------
select id from tablename a,(select max(dateT) dateT from tablename) c where a.dateT=c.dateT