add batch remove batch split batch comment selection show hidden batches hide batch highlight batch
db<>fiddle
donate feedback about
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
CREATE TABLE sotrudniki
SELECT 'Коля' name UNION ALL
SELECT 'Петя' UNION ALL
SELECT 'Вася';
CREATE TABLE transport
SELECT 'Машина' nazvanie UNION ALL
SELECT 'Велосипед' UNION ALL
SELECT 'Трактор';
Records: 3  Duplicates: 0  Warnings: 0
Records: 3  Duplicates: 0  Warnings: 0
(SELECT DISTINCT name AS zagolovok FROM sotrudniki ORDER BY 1)
UNION ALL
(SELECT DISTINCT nazvanie FROM transport ORDER BY 1)
zagolovok
Коля
Петя
Вася
Машина
Велосипед
Трактор
-- LIMIT обязателен, иначе сортировка не выполнится.
-- Предел поставить побольше.
(SELECT DISTINCT name AS zagolovok FROM sotrudniki ORDER BY 1 LIMIT 2147483647)
UNION ALL
(SELECT DISTINCT nazvanie FROM transport ORDER BY 1 LIMIT 2147483647)
zagolovok
Вася
Коля
Петя
Велосипед
Машина
Трактор