Is it possible to have a forloop in WHERE clause, something like
SELECT
name,
surname,
id
FROM person
WHERE (while(x < 5)) = id
then the result will have id's from 1 to 4. The 5 can have a list of values or an array.
Is this even possible?
ps. this example can be done by using WHERE 5 > id
I was just wondering if this can be done with a loop, I will be using this query snippet in jasper report