I have this table called iowe
. It has been created and exists in my database. This is how it looks like:
NAME AMOUNT Serial Number ---------- ---------- ------------- Praveen 20500 Roshan 5000 2 Rohit 5000 3 Shashi 7500 4
When I try to update the Serial Number corresponding to the name Praveen, by inputting the command
update table iowe
set "Serial Number" = 1 where amount = 20500
or
update table iowe
set "Serial Number" = 1 where name = 'Praveen'
I get the following error: ORA-00903: invalid table name
Other commands execute fine on this table.
You don't need the keyword table
in an update statement :
update iowe
set "Serial Number" = 1
where amount = 20500
As you have it, it's looking for a table called 'table
', while giving it the alias ' iowe
'.
Not relevant to the question, but I would also really advise not giving objects mixed-case or non-standard names, since you have to quote them - as you are with "Serial Number"
. I have yet to see a case where the added complication and opportunities for confusion can be justified.
Remove the word "table" from your update statement:
update iowe
set "Serial Number" = 1
where name = 'Praveen'
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.