最近日期
Most recent date
这是我的 table
Livraison
number date
1 3/06/2001
2 4/06/2001
3 8/07/2002
我想从 table 中获取最近的日期并显示 table 中的数字。
我现在拥有的东西不起作用...
怎么了?
/
SELECT number,date
FROM Livraison
order by date desc
limit 1
/
给我错误:
ORA - 00933
第 4 行限制
日期中的数据类型为DATE 数字中的数据类型为整数。
使用ORDER BY
和LIMIT
:
select number, date
from Livraison
order by date desc
fetch first 1 row only;
在 Oracle 中:
select l.*
from (select number, date
from Livraison
order by date desc
) l
where rownum = 1;
这是我的 table
Livraison
number date
1 3/06/2001
2 4/06/2001
3 8/07/2002
我想从 table 中获取最近的日期并显示 table 中的数字。
我现在拥有的东西不起作用...
怎么了?
/
SELECT number,date
FROM Livraison
order by date desc
limit 1
/
给我错误:
ORA - 00933
第 4 行限制
日期中的数据类型为DATE 数字中的数据类型为整数。
使用ORDER BY
和LIMIT
:
select number, date
from Livraison
order by date desc
fetch first 1 row only;
在 Oracle 中:
select l.*
from (select number, date
from Livraison
order by date desc
) l
where rownum = 1;