I have a table named ‘table1’ and it has some records like below.
Now i have written the query like below,
select value, name
from table1
where value in ('1a2b3c','8s9r3h','5h2j0m','4m5m6n','8i9o7l');
In the above query returns the records which are available in the table. But i have to return the data for the non existing records ('4m5m6n','8i9o7l')
well.
The final output should look like below,
Kindly let me know is this possible?
2
Answers
You can do it by creating a dataset with
union all
and then joining it usingleft join
to your table:Demo here