Sqlite query all primary key such that no entry in another table with given value

Multi tool use
Sqlite query all primary key such that no entry in another table with given value
Say there exists a column named X in a table named table2, table2.X, where table2.X can be some integer in the set Y={1,2,...,n}
Table2= Primary Key, Foreign Key from table 1, X
Table1=Primary Key
Each value table2.X is associated with a foreign key from another table, where each foreign key can be mapped to multiple primary keys in table2, but each primary key has a different integer for table2.X.
Basically... if no entry exists in table2 for a given foreign key such that table2.X=K, where K is some integer in Y, I want to get that foreign key.
Is this possible? Is there a better way to make this table schema such that I can easily query this?
Another way to say it is query all primary key in table1 such that no entry in table2 with given value for table2.X
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
This description is incomprehensible. Show some example data and the desired result.
– CL.
Jul 4 at 19:31