V
V
Vladimir Golub2021-07-12 10:45:02
SQL
Vladimir Golub, 2021-07-12 10:45:02

Is it possible to add the results of two queries without union?

My orm does not support union, is there any other option to join two tables?

of 4 columns: a.id, a.name, b.id, b.name make 2

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir Korotenko, 2021-07-12
@firedragon

Well, merge in the code or another option, make a storage and pull it already

S
Slava Rozhnev, 2021-07-12
@rozhnev

Use a view (VIEW):

CREATE VIEW union_tables
AS
SELECT id, name FROM a
UNION ALL
SELECT id, name FROM b;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question