Reputation: 886
I have the following sample data :-
ID PET_TYPE REF
101 Dog 1
102 Cat 7
103 Gerbil 2
104 Cat 9
105 Mouse 5
106 Cat 1
107 Rabbit 2
Using Oracle, is it possible to return all pet types, but only type Cat when the Ref is 9. So the expected output would be :-
ID PET_TYPE REF
101 Dog 1
103 Gerbil 2
104 Cat 9
105 Mouse 5
107 Rabbit 2
Upvotes: 0
Views: 36