简体   繁体   English

Oracle 使用终端的数据库更新不起作用

[英]Oracle DB update using terminal doesn't work

Im trying to update date on my oracle DB but when I do it using my terminal it doesn't work this is the code that I use:我试图更新我的 oracle DB 上的日期,但是当我使用终端执行此操作时,它不起作用这是我使用的代码:

UPDATE INVESTIGATOR SET CODE = 'LMA' WHERE NUMCHARACTER=8;

But when I do it using my Oracle SQL Developers via the interface it works and this is the code generated:但是,当我通过界面使用我的 Oracle SQL 开发人员执行此操作时,它可以工作,这是生成的代码:

UPDATE "MADJID"."INVESTIGATOR" SET CODE = 'LIA' 
WHERE ROWID = 'AAATjEAAQAAAAFUAAH' AND ORA_ROWSCN = '3120887'

I don't understand what is ROWID and ORA_ROWSCN?我不明白 ROWID 和 ORA_ROWSCN 是什么? and why the first code doesn't work?为什么第一个代码不起作用?

"Doesn't work" isn't exactly an error message. “不起作用”并不完全是错误消息。 What does it mean?这是什么意思? Did Oracle report any error? Oracle有报错吗? If so, which one?如果有,是哪一个?

Because, as far as we know, UPDATE failed because there are no rows in investigator table whose numcharacter column is equal to 8 .因为,据我们所知, UPDATE失败是因为investigator表中没有numcharacter列等于8的行。


What generated the 2nd code you posted?是什么生成了您发布的第二个代码? How come LMA become LIA ? LMA怎么变成LIA了? These are two different strings, I doubt that any tool is capable of doing that.这是两个不同的字符串,我怀疑任何工具都能够做到这一点。

ORA_ROWSCN ORA_ROWSCN

For each row, ORA_ROWSCN returns the conservative upper bound system change number (SCN) of the most recent change to the row.对于每一行,ORA_ROWSCN 返回该行最近更改的保守上限系统更改数 (SCN)。

ROWID ROWID

For each row in the database, the ROWID pseudocolumn returns the address of the row对于数据库中的每一行,ROWID 伪列返回该行的地址

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM