SQL CREATE TABLE Statement

By Hemanta Sundaray on 2022-12-20

CREATE statements allow us to create a new table in the database.

You can use the CREATE statement anytime you want to create a new table from scratch.

The statement below creates a new table named students.

CREATE TABLE students (
   id INTEGER,
   name TEXT,
   age INTEGER
);
  • CREATE TABLE: A clause that tells SQL you want to create a new table.

  • students: Name of the table.

  • (id INTEGER, name TEXT, age INTEGER ): A list of parameters defining each column, or attribute in the table and its data type:

    • id is the first column in the table. It stores values of data type INTEGER.
    • name is the second column in the table. It stores values of data type TEXT.
    • age is the third column in the table. It stores values of data type INTEGER.

Join the Newsletter