INSERT INTO

SQL INSERT INTO Keyword

The INSERT INTO command is used to add new rows of data into a table. You can either insert values into all columns or only specific columns of a table.

Tutorials dojo strip

SQL INSERT INTO Syntax

SQL

SQL INSERT INTO Students Table Example

This query adds a new student with a name only. The id will auto-increment.

SQL

SQL INSERT INTO Doctors Table Example

This query inserts a full record into the Doctors table with a first name, last name, specialty, and contact number.

SQL

SQL INSERT INTO Insert with Only Selected Columns Example

This query adds a new doctor, only filling the first and last name. Other columns will be NULL.

SQL

SQL INSERT INTO Labs

Tutorials dojo strip