Skip to content
Advertisement

force query to return duplicate values sql oracle

i have a simple query

so when this query runs and returns output it only shows 3 rows

but i want the output to be repeated like below

is there a way i can achieve this

Advertisement

Answer

Pass in a collection rather than using an IN filter:

Which, for the sample data:

Outputs:

NO SURNAME GENDER
123 m m
456 f f
789 m m
123 m m

db<>fiddle here

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement