Login

Username:

Password: 

Join us Now |  Forgot Password? | Forgot UserName?

SQL

Learn step by step



SQL - Insert Query

In SQL statement INSERT INTO is used to add new rows of data to a table in the database.
Below given 2 basic syntax for INSERT INTO statement:

INSERT INTO TABLE_NAME (column1, column2, column3,.....columnN)]
VALUES (value1, value2, val3,......valueN);

column1, column2,......columnN are the names of the columns in the table into which you want to insert data.

INSERT INTO TABLE_NAME VALUES (value1,value2,value3,......valueN);

INSERT INTO product (product_nbr, product_name)
VALUES ('2001', 'Data Modeling Tool Professional')

Output

productNumberproductName
101 laptaop
102 Desktop
103 Tablet
2001 Data Modeling Tool Professional
Insert data in one table using another table:
INSERT INTO Ftable_name [(column1, column2, ...... columnN)]
SELECT column1, column2, ......columnN
FROM Stable_name
[WHERE condition]


Related Videos