Trupti
Trupti

Reputation: 59

Append the query result to the first query result at the end

Suppose i have query 1 and query 2 in postgresql then i want a combine result of both the queries such that first i will get result set of query 1 and at the end of result set 1, result set 2 should get added. Suppose query 1 result set has 10 records and query 2 has 5 records then order should be 1 to 10 -- first result set 11 to 15 -- second result set

Please suggest as i am confused because my 1st query contains order by for 5 types of data.

Upvotes: 2

Views: 837

Answers (1)

emrahbasman
emrahbasman

Reputation: 2013

You can combine results with +

resultC = resultA + resultB

Upvotes: 2

Related Questions