如果此表中有date1,并取sysdate,则:
select * from your_table where date1=(select max(date1) from your_table);
select * from your_table where date1=(select max(date1) from your_table);
解决方案 »
- 安装ORCLE11G R2 后 , 关于登陆企业管理的问题
- 紧急求救!关于linux下的/dev/oralv
- 这样的sql语句怎么写?
- 关于 EXECUTE IMMEDIATE
- 求一条有难道的有很简单的SQL语句
- oracle 数据导入: 不导aa和bb表,其余的都导怎么写?
- 书上关于表空间的一段话,请大家帮我解疑,thx
- 大家来研究一下这个存储
- ORA-04091: 表 TABLE_NAME 发生了变化,触发器/函数不能读
- 初学者的问题,非常急,请各位尽快回答!!!!!!!
- oracle 7.3在2000下的安装问题
- 在用 create like 建用户时,出现 ORA_04042 的错误,这是什么原因啊???
from (select * from tablename
where fieldx<sysdate
order by fieldx desc)
where rownum=1;
或者:
select * from tablename a
where fieldx=(select max(fieldx) from tablename b where b.fieldx<sysdate)
and rownum=1;