Stack Tables

Create Table Of Elves

-- Create table called elves
CREATE TABLE elves (
    -- string variable
    name varchar(255),
    -- integer variable
    age int,
    -- string variable
    race varchar(255),
    -- string variable
    weapon varchar(255)
)

Create Table Of Dwarves

-- Create table called dwarves
CREATE TABLE dwarves (
    -- string variable
    name varchar(255),
    -- integer variable
    age int,
    -- string variable
    race varchar(255),
    -- string variable
    weapon varchar(255)
)

Insert Rows Into Elf Table

INSERT INTO elves (name, age, race, weapon)
VALUES ('Dallar Woodfoot', 25, 'Elf', 'Bow'),
       ('Cordin Garner', 29, 'Elf', 'Bow'),
       ('Keat Knigh', 24, 'Elf', 'Sword'),
       ('Colbat Nalor', 124, 'Elf', 'Magic')

Insert Rows Into Dwarf Table

INSERT INTO dwarves (name, age, race, weapon)
VALUES ('Kalog', 23, 'Dwarf', 'Axe'),
       ('Dranar', 145, 'Dwarf', 'Bow'),
       ('Bratar', 12, 'Dwarf', 'Axe'),
       ('Dragga', 23, 'Dwarf', 'Axe')

Stack Tables On Top Of Eachother

-- All rows from elf table
SELECT * FROM elves
-- Stack on top of...
UNION ALL
-- All rows from dwarf table
SELECT * FROM dwarves
nameageraceweapon
Dallar Woodfoot25ElfBow
Cordin Garner29ElfBow
Keat Knigh24ElfSword
Colbat Nalor124ElfMagic
Kalog23DwarfAxe
Dranar145DwarfBow
Bratar12DwarfAxe
Dragga23DwarfAxe