In my java code, I have written a native query. The below list object should be parametrizable, as like list = ('a','b')
But my intension will be that one of the subqueries should only be executed, when there is a match of the given list with the constant ‘a’, ‘b’ ….
Is it possible?
WITH A AS (SELECT ID FROM A WHERE 'a' in list), (SELECT ID FROM B WHERE 'b' in list), (SELECT ID FROM C WHERE 'c' in list), (SELECT ID FROM D WHERE 'd' in list)