I just have an odd question. I know it may be funny but I just have a curiosity about this.
Here is my question in detail:
Suppose there is a column in database named ‘gender’ that has boolean value i.e. either 0 or 1. 0=Male and 1=Female.
Now when we display data of a form that has this type of field, we have to do code, that (gender=0)?Male:Female.
Now I just want to know if sql provide any way, where automatically when a Record Set is generated, all gender value is replaced by Male or Female automatically. i.e. no need of this one line code?
aside from case/decode which others have shown, in 11gR1 onwards we can have a virtual Column.
you can index virtual columns too if you so desire.