|
The INSERT statement allows you to insert a single record or multiple records into a table. The general syntax is as under.
Syntax 1:
INSERT INTO table_name VALUES (value1, value2,....)
The first syntax form of the INSERT INTO SQL clause doesn't specify the column names where the data will be inserted, but just their values:
Syntax 2:
INSERT INTO table_name (column1, column2,...)
VALUES (value1, value2,....)
The second form of the SQL INSERT INTO command, specifies both the columns and the values to be inserted in them:
Example:
INSERT INTO empinfo(FirstName, LastName, Email, DOB) VALUES (‘Ajay, 'Rathor', 'ajayrathor@studiesinn.com', '08-24-1986')
|
ID
|
FirstName
|
LastName
|
Email
|
DOB
|
|
1
|
Ajay
|
Rathor
|
ajayrathor@studiesinn.com
|
08-24-1986
|
|