bind variables with null values
We are using Oracle 11.2.0.4 . we have the below SQL and the bind values will be passed by our application.
1) SQL - select sum(amount) from orders where product_family in (:bind_1,:bind_2,:bind_3,:bind_4);
if all the bind values are null(not chosen in the application) this query will not return any value. however our requirement here is if all bind values are null remove that filter - show all the values
e.g
select sum(amount) from orders
-- comment out where product_family in (null,null,null,null):