Hi, I am new in SQL. Now I want to handle the case that if I am selecting for the Name and Unit in table of fruit where Name in ('apple','orange','banana').
However, there are no item call 'banana' in database yet and I want to have a default value for 'banana' like
Name Unit
apple 10
orange 20
banana 0
How can I do this instead of just getting
Name Unit
apple 10
orange 20
Can I do this by using Union??Thanks!
Furthermore information, actually I am doing this with my C# program. Users can search the Unit of the item by using string [] and now I want to have a default value if there is a item can't be search.