我收到“ SQL错误:ORA-01733:此处不允许使用虚拟列”
这是我的代码:
update (
Select g.FIRST300BB from (
select FIRST300BB, row_number() over (order by pitchandeventid) r
from gamedata_me
where hitterid = 5000
and (eventcode = 'BB')
) g
where r between 0 and 300
) t
set t.FIRST300BB =1
有任何想法吗?我被困在使用Oracle的过程中,因此发现无法执行Update / From语法...因此我正式圈了圈圈马车
最佳答案
尝试使用等效查询
update gamedata_me
set first300BB=1
where rowid in(
Select g.rid from (
select rowid rid, row_number() over (order by pitchandeventid) r
from gamedata_me
where hitterid = 5000
and (eventcode = 'BB')
) g
where r between 0 and 300
)
关于sql - SQL虚拟列,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/3209804/