Answer the question
In order to leave comments, you need to log in
How to combine the result of two sql queries?
Good time of the day, how to combine the result of two requests into 1 line by line, that is: the result of 1 request, then the result of the second, then the result of the first and so on.
Here is an example query:
SELECT * FROM block where own > '9' AND type = 1 order by own
SELECT * FROM block where own > '9' AND type = 2 order by own
Answer the question
In order to leave comments, you need to log in
UNION ,
and the idea of rowwise is nonsense in the context of the fact that relational databases do not guarantee the order of issuing records as a result of a query.
the result of query 1, then the result of the second, then the result of the first, and so on.
SELECT * FROM block where own > '9' AND type in (1,2) order by own
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question