I have 2 tables data and page, in data table I have some records, and some data records id will be store in page table.
Now I want select id and title form data table which is not on page table. So I wrote this query :
SELECT d.id,d.title FROM data AS d, page AS p WHERE d.id NOT IN (p.data_id) ORDER BY d.title ASC this query will work, but when page table is empty this query cannot restore records !