I have a query I am using IN operator and I want all the rows from in given list as shown in the picture that I want 3 rows for id 1 and one for id 2, but I only get one row for Id = 1 is there any other solution for this.
CodePudding user response:
IN
can't do what you want. JOIN
instead:
select * from logs
JOIN (values (1),(2),(1),(1)) x (id)
ON logs.id = x.id