I ran these statements:
create table SAMPLE(
ID INT
);
INSERT INTO SAMPLE VALUES(1);
COMMIT;
GRANT INSERT, SELECT, UPDATE, DELETE ON SAMPLE TO NEWLEC;
COMMIT;
But Eclipse says cannot find the table.

How can I resolve it?
I ran these statements:
create table SAMPLE(
ID INT
);
INSERT INTO SAMPLE VALUES(1);
COMMIT;
GRANT INSERT, SELECT, UPDATE, DELETE ON SAMPLE TO NEWLEC;
COMMIT;
But Eclipse says cannot find the table.

How can I resolve it?
Copyright © 2021 Jogjafile Inc.
You are connecting as the
newlecuser, and unqualified references to tables will look for them in that schema, not under other users.You can qualify the table name:
For example, if you were connected as HR when you created the table, you would do:
You could also create a public synonym, which is probably overkill and can cause other issues and confusion; or create a private synonym for the
newlecuser which points to the rea table, e.g.:so the unqualified query now sees the synonym, and through that the real table owned by someone else. Or you could set your
current_schemaafter logon:so all unqualified queries now see objects owned by that user, not
newlec.However, if this is a basic assignment on a beginner course then you are probably just expected to qualify the name.