There is a table 1 and table 2 with the same name as the composition of the fields.
Is it possible to place the tables one after the other in the request (see screen)?
Typically, the UNION and UNION ALL operators are used to combine different samples with the same set of fields. The difference between them is that in the second case there are absolutely all the results in the sample, and in the first case there are no duplication.
For your question, you can build the following query:
SELECT 'Табл 1' as tname, * FROM Таблица1 UNION ALL SELECT 'Табл 2' as tname, * FROM Таблицы2 ORDER BY tname, id Since ms-access has several specific SQL syntax, the following syntax is also possible to completely merge a table without filtering the results:
TABLE [Таблица1] UNION ALL TABLE [Таблица2] Source: https://ru.stackoverflow.com/questions/622218/
All Articles
ms-exceland notms-access. If suddenly you needed to select data from two tables inaccessand show it in the form of one result, then you will be helped by theunion alloperator - teranSELECT 'Табл 1' as tname, * FROM Таблица1 UNION ALL SELECT 'Табл 2' as tname ,* FROM Таблицы2 ORDER BY tname, idsomething like that, no access. - teranTABLE [Таблица1] UNION ALL TABLE [Таблица2]- teran