SQL INSERT INTO Statement

By Hemanta Sundaray on 2022-12-19

The INSERT statement inserts a new row into a table.

We can use the INSERT statement when you want to add new records.

The statement below enters a record for Paul Hansen into the students table.

INSERT INTO students (id, name, age)
VALUES (1, 'Paul Hansen', 22);
  • INSERT INTO is a clause that adds the specified row or rows.

  • students is the table the row is added to.

  • (id, name, age) is a parameter identifying the columns that data will be inserted into.

  • VALUES is a clause that indicates the data being inserted.

  • (1, 'Paul Hansen', 22) is a parameter identifying the values being inserted.

    • 1 is an integer that will be added to id column.
    • Paul Hansen is the text that will be added to name column.
    • 22 is an integer that will be added to age column.

Join the Newsletter