SQL INSERT

The SQL INSERT statement allows you to insert a single record or multiple records into a table. This SQL statement can be used on any database either it is MySQL or MsSQL.

The syntax for the SQL INSERT statement is:

Below SQL statement can be used if you want to insert data into specific or specified column names then we can use this below statement.

INSERT INTO table (column-1, column-2, ... column-n) 
VALUES (value-1, value-2, ... value-n);

Inserting Multiple Rows in Single SQL Statement,

INSERT INTO table (column-1, column-2, ... column-n) 
VALUES (value-1, value-2, ... value-n),
(value-1, value-2, ... value-n),
(value-1, value-2, ... value-n);

Insert data into table without specifying any column names, below is the statement.

INSERT INTO table 
VALUES (value-1, value-2, ... value-n);

Inserting Multiple Rows in Single SQL Statement,

INSERT INTO table 
VALUES (value-1, value-2, ... value-n),
(value-1, value-2, ... value-n),
(value-1, value-2, ... value-n);

Vivek Vengala
 

Vivek Vengala is a Online Entrepreneur, Web Developer from Hyderabad India.

Click Here to Leave a Comment Below 0 comments

Leave a Reply:

x

Join My Facebook Group to Receive Coding Tutorial for Free

email-subsribe