Main content
Course: Unlisted resources area > Unit 2
Lesson 3: SQL documentation- SQL: CREATE table with multiple data types
- SQL: CREATE table with a primary key
- SQL: Specifying DEFAULT values in CREATE TABLE
- SQL: CREATE TABLE with foreign key reference
- SQL: INSERTing values in tables
- SQL: SELECTing rows
- SQL: SELECTing with WHERE conditions
- SQL: Filter with IN
- SQL: SELECT with ORDER BY
- SQL: Transform SELECT results with CASE
- SQL: Filtering with LIKE
- SQL: Using SELECT with LIMIT
- SQL: ROUND and other core functions
- SQL: SELECT with aggregate functions
- SQL: Grouping SELECT results with GROUP BY
- SQL: Using HAVING with GROUP BY
- SQL: JOIN on tables
- SQL: UPDATE and DELETE
- SQL: ALTER TABLE
© 2024 Khan AcademyTerms of usePrivacy PolicyCookie Notice
SQL: ALTER TABLE
Use the
ALTER TABLE
command to add a new column to a table (ADD COLUMN
) or rename the table (RENAME TO
) after creating it.It doesn't make sense here, where you can always edit your initial
CREATE TABLE
statement, but in actual databases, you would need to use it once you did the CREATE TABLE
and realized some time after that you needed a different schema.For more details, see the SQLite reference for
ALTER TABLE
.▶️ You can also learn about this in our ALTERing tables after creation talkthrough.