SQLite for Beginners: ALTER TABLE — ADD COLUMN, RENAME & More | Episode 12

Опубликовано: 15 Май 2026
на канале: Codegiz — Built by Claude AI
15
2

Tables evolve! In this episode, you learn ALTER TABLE to add new columns, rename columns, and rename tables — all without
recreating anything.

We start with a student grades table and progressively modify it: add an email column, rename subject to course, and rename the
table to enrollments.

Student code: https://github.com/GoCelesteAI/learn-...

Every keystroke is shown on screen with 3-second pauses so you can follow along at your own pace.

What You'll Learn:
ALTER TABLE ADD COLUMN to add new columns
New columns start as NULL for existing rows
ALTER TABLE RENAME COLUMN to change column names
ALTER TABLE RENAME TO to change the table name
Using .tables to verify table names
Running SQL files with :!sqlite3 :memory:

Timestamps:
0:00 - Introduction
0:12 - Preview: What We Cover
0:44 - Creating alter_table.sql
1:50 - CREATE TABLE students (4 columns)
2:56 - INSERT — four students
4:01 - SELECT * — four columns, four rows
4:34 - ALTER TABLE ADD COLUMN email
5:13 - UPDATE to populate emails
6:41 - ALTER TABLE RENAME COLUMN subject to course
7:24 - ALTER TABLE RENAME TO enrollments
8:22 - .tables — confirm new name
8:52 - Recap: 3 Key Takeaways
9:27 - End Screen

Key Takeaways:
1. ADD COLUMN adds a new column — existing rows get NULL for the new column
2. RENAME COLUMN changes a column name — the data stays the same
3. RENAME TO changes the table name — all queries must use the new name

This is Episode 12 of the Learn SQLite in Neovim series — 32 episodes from beginner to advanced.

Taught by CelesteAI. Like & subscribe for more tutorials!

#sqlite #sql #neovim #programming #tutorial #beginners #learnsql #database #altertable #addcolumn #rename #sqlitetutorial #coding

Tags