In my PL/SQL code, I've a variable and I want to check if the value of this var is in a list of values. This list of values I want to get directly from a select statement. Can I do something like below:
IF (v_var1 in (select col1 from <table> where <condition>))
THEN
<do something>
ELSE
<do something else>
END IF;