I
I
iTOMAT2015-04-26 14:12:51
SQL
iTOMAT, 2015-04-26 14:12:51

Pulling data from multiple tables into one SQL?

Hello. It is required to build a query so that data from the Bloki_Pitaniya, Jestkie_Diski, Korpusa, Materinskie_Plati, Operativnaya_Pamyat, Prosessori, Videokarti, Zvykovie_Karti tables are output to the Sklad table. Thanks in advance.d48501e14496454fb7f66a250c25952a.png

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
avada kedavra, 2015-04-26
@kedavra

UNION

S
sid3r, 2015-04-26
@sid3r

INSERT INTO Sklad (Proizvoditel, Model) 
(SELECT Proizvoditel, Model FROM Bloki_Pitaniya) UNION
(SELECT Proizvoditel, Model FROM Jestkie_Diski) UNION
...

Well, finish off for the rest of the tables, with not interesting names, I advise you to call the tables in English words, and not in transliteration, instead of Zvykovie_Karti , soundcards are much more pleasant

I
iTOMAT, 2015-04-26
@iTOMAT

I did it a little differently, now it gives an error, how can I fix it?
7d90ea583609446cb464ae88b57a3579.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question