Here is my emp table and data. What I want is in the decode statement, when it is true (Q), then I need empid in (10,20), otherwise, empid in 30. I am open to any other solutionl ike case statement in the where clause. Whatever works. Thanks!
select * from emp;
EMPID
10
20
30
select * from emp where empid in decode('Q', 'Q', (10, 20), 30)
Start Free Trial