0
I need to display the last 5 results of a query, but I do this query twice because I need to change the Where clause, to return the values I need.
I thought of something like:
SELECT id, project_id, name, subject FROM "issues" where project_id = 94
UNION ALL
SELECT id, project_id, name, subject FROM "issues" where project_id = 95
limit 5
But it didn’t work... Is there any way to make a query only and change its clause to display all the records I need ?
you couldn’t do so:
SELECT id, project_id, name, subject from "issues" where project_id = 94 and project_id = 95 order by id desc limit 5
???– R.Santos