Could you help me on this one?
See I have this order_table
where I have to find the order numbers that don't exist in the table.
Let's say I have columns id
, order_number
in the table named order_table
.
What I want is to show in my result all the values that don't exist in order_table
.
Like for example:
I have order_number
values 43454235423
, 785686847856
, 1243215421
, 6437647
, 978423454
. I then do
SELECT *
FROM order_table
WHERE order_number = ('43454235423', '45423534252','785686847856', '1243215421',
'6437647', '978423454','5634636','4354235235')
--return order_numbers that don't exist in the table as 'status'
This is my sample query result:
id order_number status
---- ------------ ---------
1 43454235423 not found
56 785686847856 not found
1000 1243215421 not found
6785 6437647 not found
467 978423454 not found