finding missing values, mysql??
- by praveenmon
i am using mysql database
i have a table called sales
its primary key is sales_id
-------------------------------------
sales_id | invoice_id |
-------------------------------------
1 | 147
2 | 148
3 | 150
for sales-id 3 the invoice is supposed to be 149. i want to know which numbers are missing from invoice_id (i start invoice_id is 147 and end invoice_id is 4497). The invoice_id had no relation with sales_id
is it possible to know which numbers are missing from invoice_id, using some queries??