SQL Insert Command


Prev Tutorial Next Tutorial

SQL Insert Command

Insert Command is used to insert new record in table. Using Insert Command you can insert a single or a multiple records in a table.

Insert data in table in two form, which is given below.

  • Insert data without speficying column name
  • Insert data by specifies both the column names and the values to be inserted

Insert data without speficying column name

Syntax

	
INSERT INTO table_name
VALUES (value1,value2,value3,...);

Insert data by specifies both the column names and the values to be inserted

Syntax

	
INSERT INTO table_name (column1,column2,column3,...)
VALUES (value1,value2,value3,...);

Employee table

Here you can insert data in Employee table by using Insert Command

emp_idnamesalary

Example

INSERT INTO Employee
VALUES (101, 'amit', 24000);

Result after Execute above query.

emp_idnamesalary
101Amit24000

Prev Tutorial Next Tutorial

Advertisements




Facebook Likes

Advertisements