I am new to databases;
I am trying to query (SELECT) naam, functie and schaal (salary-scale) of an employee.
But there is a catch, because naam and functie are within the table: "werknemer" and scale is in the table "s_schaal".
What I think needs to happen is the following: The employees salary should be looked at and then compared to "ondergrens" and "bovengrens", if employees salary is equal to or between one of the entries then the correlating "schaal" should be outputted as well.
In order to SELECT wnaam, functie, schaal (corrrelating scale which is in another table).
This is what I tried:
SELECT werknemer.wnaam, werknemer.functie, s_schaal.schaal WHERE werknemer.salaris IS >= s_schaal.ondergrens AND werknemer.salaris IS <= s_schaal.bovengrens
This is the error message
INSERT INTO werknemer SELECT * FROM s_schaal WHERE werknemer.salaris = s_schaal.ondergrens AND werknemer.salaris = s_schaal.bovengrens Error Code: 1054. Unknown column 'werknemer.salaris' in 'where clause' 0.000 sec