I have a task of connecting to a legacy Oracle 9i database and validate users with the new ERP, however when I try to run the query, I get ORA-00903: invalid table name
This is the naive query I am starting with: SELECT * FROM USER
. The table does exist, and I can view it’s content using an “in-house database browser” made by some company that no longer exist and to which I do not have the source code for.
Obviously, SELECT * FROM ALL_USERS
is not what I want, etc.
The point is to validate that some user credentials are valid, the most fundamental concept of authentication, against a table called “USER”, with two fields: USER_NO
and PASSWORD
(all values stored in plain text (… yeah… I know).
Advertisement
Answer
user
is a reserved keyword. If you want to use that for a table name you have to quote it (which you already had to do when creating it)
select * from "USER";