The INSERT clause is to allows you insert a single record or multiple records into a table. INSERT clause is used together with INTO.

The INSERT clause syntax will look like this:

INSERT INTO [TABLE NAME]
VALUES ([VALUE 1], [VALUE 2], ...)

Or we can state out the columns that you want to enter the data to. like:

INSERT INTO [TABLE NAME] ([COLUMN 1], [COLUMN 2], �.)
VALUES ([VALUE 1], [VALUE 2] , ...)


EXAMPLE :

We can try to insert data to the table below.

Table GameScores

PlayerNameDepartmentScores
JasonIT3000
IreneIT1500
JaneMarketing1000
DavidMarketing2500
PaulHR2000
JamesHR2000

SQL statement :

INSERT INTO GameScores
VALUES ('Vivian','Marketing',2500)

After execute the SQL command. The table will look like like this. Row which is highlighted with Yellow is the data that been inserted.

Table GameScores

PlayerNameDepartmentScores
JasonIT3000
IreneIT1500
JaneMarketing1000
DavidMarketing2500
PaulHR2000
JamesHR2000
VivianMarketing2500


Let's try with specified the column to insert:

SQL statement :

INSERT INTO GameScores (PlayerName,Department)
VALUES ('Kenny','HR')

After execute the SQL command. The table will look like like this. Row which is highlighted with Yellow is the data that been inserted.

Table GameScores

PlayerNameDepartmentScores
JasonIT3000
IreneIT1500
JaneMarketing1000
DavidMarketing2500
PaulHR2000
JamesHR2000
VivianMarketing2500
KennyHR0

Column that never stated when using the INSERT Statement, It will automatically insert the default value to that column. with this Example, the DEFAULT value for Scores is 0.