SELECT what is left and has not been entered yet

Let’s say I have a column “name” and the field is a select field. How can I do a select that only shows those names that have not been entered yet for a new id_name?

table_name
id_name name
1 Max, Mustermann
2 Peter, Bauer
3 …SELECT select_name FROM table_select ORDER BY select_name…(Result of SELECT should be “Peter, Bauer” and “Anna, Helber”)…

table_select
id_select select_name
1 Max, Mustermann
2 Peter, Bauer
3 Anna, Helber
4 Karl, Gustav

Re: SELECT what is left and has not been entered yet

SELECT id, name FROM table_select WHERE id NOT IN (SELECT id FROM table_name)

Please look at some sql samples on the www … and please ask your question in the correct forum (database)

Re: SELECT what is left and has not been entered yet

Thank you…I would look at some examples if I would know what I was looking for. Kind of hard to find a matching sample. Meanwhile I thought about creating a helper column “signed” which tells the select that this data has already been picked, but your solution is very logical and a lot easier.

Sorry for the wrong forum…

Re: SELECT what is left and has not been entered yet

Select all names from select_name that have not yet been used in table_name. THis should do the trick:

SELECT select_name FROM table_select sel
WHERE NOT EXISTS
( select ‘x’
from table_name nam
where nam.name = sel.select_name
)

(‘x’ is just a dummy value)