Create a Table
Define and create a new table schema.
We'll cover the following...
We'll cover the following...
Time to build your own world! In this lesson, you’ll create your first SQL table, a place to store structured data.
Goal
You’ll aim to:
Use
CREATE TABLEto define a table.Set column names and types.
Understand table schemas.
Basic table creation
This table will have four columns, each with a specific data type:
id: A unique number (INTEGER).title: The name of the book (TEXT).author: Who wrote it (TEXT).pages: The number of pages (INTEGER).
The books table
This table contains basic book information, including the title, author, and number of pages for each book.