sql insert into table

Today, We want to share with you sql insert into table.In this post we will show you sql insert multiple rows, hear for how to insert values in particular column in sql, we will give you demo and example for implement.In this post, we will learn about How to insert data in database using Laravel framework? with an example.

SQL INSERT INTO Table SELECT Statement

In this tutorial we learn to all about sql insert into table Examples like as a insert into oracle, select into sql, sql insert date or many more.

SQL INSERT INTO Statement

INSERT INTO Members (MemberName, ContactName, Address, City, PostalCode, Country)
VALUES ('Bhagwati', 'Dr. Parag Shukla', 'Parag 21', 'Bhavnagar', '9856', 'India');

Insert Data Only in Specified Columns

INSERT INTO Members (MemberName, City, Country)
VALUES ('Bhagwati', 'Bhavnagar', 'India');

SQL – INSERT Query

The following statements would create six records in the MemberS table.

INSERT INTO MemberS (ID,NAME,AGE,ADDRESS,POINT)
VALUES (1, 'Kajal', 14, 'Ahmedabad', 5489.00 );

INSERT INTO MemberS (ID,NAME,AGE,ADDRESS,POINT)
VALUES (2, 'Bhoomi', 28, 'Rajkot', 1598.00 );

INSERT INTO MemberS (ID,NAME,AGE,ADDRESS,POINT)
VALUES (3, 'Jalapa', 25, 'Surat', 5489.00 );

INSERT INTO MemberS (ID,NAME,AGE,ADDRESS,POINT)
VALUES (4, 'Chandni', 27, 'Kalavad', 6598.00 );

INSERT INTO MemberS (ID,NAME,AGE,ADDRESS,POINT)
VALUES (5, 'Merra', 30, 'Ahmedabad', 8598.00 );

INSERT INTO MemberS (ID,NAME,AGE,ADDRESS,POINT)
VALUES (6, 'Bhavika', 27, 'Gondal', 4598.00 );

Example – Using VALUES keyword

INSERT INTO members
(member_id, sirnm, profilenm)
VALUES
(10, 'Ajaydevgan', 'Sigham');

INSERT INTO members
(member_id, sirnm, profilenm)
VALUES
(10, 'Ajaydevgan', 'Sigham'),
(11, 'Kajol', 'Morni');

INSERT INTO members
(member_id, sirnm, profilenm)
VALUES
(10, 'Ajaydevgan', 'Sigham');

INSERT INTO members
(member_id, sirnm, profilenm)
VALUES
(11, 'Kajol', 'Morni');

Example – Using DEFAULT VALUES keyword

INSERT INTO members
(member_id, sirnm, profilenm)
DEFAULT VALUES;

Example – Using SELECT statement

INSERT INTO contacts
(contact_id, sirnm, profilenm)
SELECT member_id, sirnm, profilenm
FROM members
WHERE member_id <= 150;

SELECT count(*)
FROM members
WHERE member_id <= 250;

I hope you get an idea about sql insert into table.
I would like to have feedback on my infinityknow.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.