简单的查询语句
iddate
XPlzvY2012-03-01 15:47:49
Es0duD2012-03-01 09:47:00
DdUA9dj2012-03-01 12:52:35
D6TRZip2012-03-01 15:14:28
D975KRD2012-03-01 15:16:35
2foFI42012-03-01 15:38:22
这个怎么取时间最晚的那一个id,真是越学越回去了!
[解决办法]
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