oracle PL/SQL:根据 ROWID 更新行

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5015299/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-18 22:46:28  来源:igfitidea点击:

PL/SQL: Update row based on ROWID

oracleplsqlrowid

提问by SlappyTheFish

I am trying to update a row in a table which has no unique index. So, I selected the ROWID of the row I want to update and now I want to update the row like this:

我正在尝试更新没有唯一索引的表中的一行。因此,我选择了要更新的行的 ROWID,现在我想像这样更新行:

UPDATE MYTABLE SET MYCOLUMN = 0 WHERE ROWID = "AAAIWWAAFAAApwDADR"

MYCOLUMN is of type NUMBER(1)

MYCOLUMN 的类型为 NUMBER(1)

I get the error: invalid identifier [SQL State=42000, DB Errorcode=904]

我收到错误: invalid identifier [SQL State=42000, DB Errorcode=904]

Any idea why?

知道为什么吗?

回答by Pablo Santa Cruz

Try using single quotes:

尝试使用单引号:

UPDATE MYTABLE SET MYCOLUMN = 0 WHERE ROWID = 'AAAIWWAAFAAApwDADR'