The SQL INSERT Statement is used to insert data to a table in the database.

SYNTAX

36.png
 

Where,

  • INSERT INTO                                    : keyword used to insert records in a table.

  • Table_name                                     : The name of the table into which you want to insert the data

  • Column1Name, Column2Name        : The name of the columns of the table in which you want to insert data.

 

EXAMPLE

Let’s insert data into a new table Persons in a test Database.

37.png

Figure 13.1. Insert into Persons Table

 

PRACTICE YOURSELF 

38.png

Want More SQL Deep Dives