package using Oracle RRS feed

  • Question

  • User-1075092149 posted

    i would like to ask about "IN" clause that mean

    select * from table_A where col in ('1','2')

    in clause is based on the paraA , if the paraA is "1" , then select col in ('1','2') , otherwise select col not in ('1','2')

    how can i pass the parameter to the select clause based on paraA.

    as i don't want to write 2 select statment based on paraA as belows:

    if paraA='1' then

    select * from table_a where col in ('1','2');


    select * from table_a where col NOT in ('1','2');

    end if;

    how can i control it in 1 select statement in package in oracle?

    Thursday, August 30, 2012 4:56 AM


  • User-578610739 posted

    Hi Member,

    see link,


    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, August 30, 2012 7:55 AM