PL/SQL: Update row based on ROWID

SlappyTheFish picture SlappyTheFish · Feb 16, 2011 · Viewed 9.9k times · Source

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:

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

MYCOLUMN is of type NUMBER(1)

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

Any idea why?

Answer

Pablo Santa Cruz picture Pablo Santa Cruz · Feb 16, 2011

Try using single quotes:

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