Answer the question
In order to leave comments, you need to log in
How to select sequentially from two tables without duplicate columns (SQL)?
There are two tables, one contains the code, dimensions and unit of measurement of materials, the other is the same, but for purchased products. It is necessary to display the data in one query so that the data on the condition from one table comes first, and after them the data from the second table.
For example: material_code_1 material_size_1 material_measurement_unit_1
material_code_2
material_size_2
material_measurement_2
unit_of_purchased_2
Answer the question
In order to leave comments, you need to log in
there is such a wonderful UNION operator:
select shifr, size, unit from table1 where param1=:param
union
select shifr, size, unit from table2 where param1=:param
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question