我遇到了 oracle 的问题,只需创建带限制的简单选择,但 oracle 没有这个功能,所以我写了类似的东西
:
select b.strdir,b.num, b.value, b.time
from mytable b
where b.dev_id = 223
and b.cur_id = 23
and b.time=(
select xx.time from mytable xx
where xx.dev_id = b.dev_id and xx.cur_id = b.cur_id and xx.nom = b.nom
and rownum=1
order by xx.time DESC
)
order by b.strdir nulls first;
但它不起作用请帮助:/