So im trying to run a command in Oracel Apex to select a colum were primary key of tabel one and foreing key of tabel 2 are the same.
`select name from COMP_EMPL where COMP_EMPL.employee_id = MANAGER."employee_id";`
When i run it the error:
`ORA-00904: "MANAGER"."employee_id": invalid identifier apears`
The tabel names are corect and the column names are corect so its not a spelling isue. The tabels are populated and coresponding values for the two keys exist.
Error

COMP_EMPL table

MANAGER table

Sorry the photots are as code but it would not let me post the question otherwise (smth about bad formating)
I have tried removing the "" from the column names but its solved nothing i also tried renaming the column but nothing changed same error with diferent name also the same error apears werever i use MANAGER."employee_id" so its not an isue with that specific comand.
First of all, code you posted is invalid. It is a join you need; you can't reference the
MANAGERtable inWHEREclause just because. Correct syntax isFor example, with some sample data:
Query you'd use:
Note double quotes I used for identifiers. They are necessary because you chose to create tables using double quotes. It means that you have to enclose them into double quotes EVERY TIME you reference them. If you used mixed letter case, you'd have to match letter case as well.
Shortly: it is a bad idea to use double quotes when working with Oracle. By default, Oracle stores names (tables, procedures, columns, ...) in uppercase, but lets you reference them using any letter case you want unless you used double quotes.
If you look at e.g.
MANAGERtable, you'll see thatmanager_idis created in lower case (so you have to enclose it into double quotes and write lower case), whileEMPLOYEE_IDis written in upper case (so you can reference it using upper case, or enclose them into double quotes but also with upper case).On the other hand, all columns in
COMP_EMPLtable were created in lower case (which means with double quotes).If I were you, I'd drop both tables and create new ones as e.g.
Then you can use all this:
Using sample data from beginning of this post: