Add Column

Create Table

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

Insert Rows

-- Insert into the table adventurers
INSERT INTO adventurers (name, age, race, weapon)
VALUES ('Fjoak Doom-Wife', 28, 'Human', 'Axe'),
       ('Alooneric Cortte', 29, 'Elf', 'Bow'),
       ('Piperel Ramsay', 35, 'Elf', 'Sword'),
       ('Casimir Yardley', 14, 'Elf', 'Magic')

Add Column

-- Alter the table called adventurers
ALTER TABLE adventurers
-- Add a column called armor that is a 255 
-- character string field with the default value of null
ADD COLUMN armor varchar(255) NULL

View Table

-- Retrieve all rows
SELECT * FROM adventurers
nameageraceweaponarmor
Fjoak Doom-Wife28HumanAxeNULL
Alooneric Cortte29ElfBowNULL
Piperel Ramsay35ElfSwordNULL
Casimir Yardley14ElfMagicNULL