oracle中要查询最新日期的数据记录,要怎么写啊? RT........... 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 --如有日期字段,可以:select * from Your_table where your_date=(select max(your_date) from Your_table);--如没有日期字段,可以使用物理rownum(不能用order by 和索引)来查找。 select * from (select t.*, row_number() over(order by t.时间字段 desc) rn from table_name t) where rn = 1 或者用:select * from table_name where 时间字段=(select max(时间字段) from table_name); 写一个查询语句? 奇怪的GROUP BY错误 Oracle 数据格式化:例如10045转换为100.45 急,创建的触发器带有编译错误 求一个oracle语句 如何将oracle服务器的时间格式化为‘yyyy-mm-dd'格式后插入类型未date的字段中? 一个动态sql文的问题 Oracle数据库中长字符串用什么? 如何把sql文件导入数据库,加急!!!!!(在线) 送分~!最简单的sql问题,答对者必给分! mssql转oracle建表 关于flashback_transaction一问
select * from Your_table where your_date=(select max(your_date) from Your_table);--如没有日期字段,可以使用物理rownum(不能用order by 和索引)来查找。
select *
from (select t.*, row_number() over(order by t.时间字段 desc) rn from table_name t)
where rn = 1
或者用:
select *
from table_name where 时间字段=(select max(时间字段) from table_name);