It seems i am unable to find a efficient way to solve this problem with a oracle SQL query.
Please share your suggestions.
I have the below table.
| Descr | Code1 | Code2 | Code3 | Code4 | Code5 |
|---|---|---|---|---|---|
| Apple | A | AA | aa | Ap | Ae |
| Apple | C | AA | aa | Ap | Ae |
| Apple | A | DD | aa | Ap | Ae |
| Mango | M | MA | mn | mg | mo |
I would use a Query
Select Desc from myTable where Code1='A'
Above query would give me 'Apple' as the response
Select Desc from myTable where Code2='AA'
Above query would again give me 'Apple' as the response
Combining both:
Select Desc from myTable where (Code2='AA' or Code1='A')
How can i know due to which colum has the "OR" condition satisfied ?