Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/sql/85.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
SQL虚拟列_Sql_Oracle_Sql Update - Fatal编程技术网

SQL虚拟列

SQL虚拟列,sql,oracle,sql-update,Sql,Oracle,Sql Update,我收到“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

我收到“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 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
    )