sql statement error: “column .. does not exist”

No, the column FK_Numbers_id does not exist, only a column "FK_Numbers_id" exists

Apparently you created the table using double quotes and therefor all column names are now case-sensitive and you have to use double quotes all the time:

select sim.id as idsim, 
       num.id as idnum 
from main_sim sim 
   left join main_number num on ("FK_Numbers_id" = num.id);

To recap what is already documented in the manual:

The column foo and FOO are identical, the columns "foo" and "FOO" are not.

Leave a Comment