语句如下,
update orders_t a
set (
status,the_man,the_date
)
= (
select '3',c.the_man,c.the_date
from order_detail_t c
where a.id= c.id
)
where a.id=10因为同一id中的the_man可能有多个不同的值,要怎么样才能取到
select '3',c.the_man,c.the_date
from order_detail_t c
where a.id= c.id
中的最后一行呢
update orders_t a
set (
status,the_man,the_date
)
= (
select '3',c.the_man,c.the_date
from order_detail_t c
where a.id= c.id
)
where a.id=10因为同一id中的the_man可能有多个不同的值,要怎么样才能取到
select '3',c.the_man,c.the_date
from order_detail_t c
where a.id= c.id
中的最后一行呢
解决方案 »
- 表解锁 kill session时报错:ORA-01031: insufficient privileges
- oracle biee 用户访问权限问题
- oracle和java开发问题?
- 创建表报00922错误!
- 向有经验者请教一个问题?谢谢!
- 我要安装 ORACLE9I ,怎么点setup.exe 没有什么反应呢?
- 调用存储过程提示语法错误或非法接入!
- 请教Oracle和Sybase两者之间的最大区别!
- 启动Oracle ManagementServer报997错误
- 求指导,如何升级Oracle数据库
- toad9.6连接Oracle时报错,以前还好的,今天就不行了,高手帮忙!
- oracle wrap
set (
status,the_man,the_date
)
= (
select '3',c.the_man,c.the_date
from order_detail_t c
where a.id= c.id
and c.pk = (select max(pk) from order_detail_t d
where c.id = d.id)
)
where a.id=10
select '3',min(c.the_man) keep(dense_rank first order by c.the_date desc),
min(c.the_date) keep(dense_rank first order by c.the_date desc)
from order_detail_t c
where a.id= c.id