'Best way to get required row
I would like to write a query that checks the particular record and if it is not found it should return the other result
For example:
SNO | FIRST_COLUMN | SECOND_COLUMN | STATUS
1 | value1 | value2 | 1
2 | value1 | value2 | 1
3 | value1 | value2 | 0
4 | value1 | value2 | 1
In the above example the query should return the row with status value 0. If the status with value 0 doesn't exists then it should return any row with status value 1.
Please accept my apologize if my explanation was bad.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
