How we can insert data into a table in SQL?

Last Update: Apr 28 2024 | BY: Muhammad Nabil

G

Gautam Jha

Insert Quary in SQL Database

The INSERT query is used to insert the data record (or a new row) in a table by using the INSERT INTO statement. The two ways are used for inserting rows in a table.


Syntax of Insert Quary in SQL

If you want to insert data (or insert a row) in a table by using an SQL database, here is the query syntax to insert data:


1. Only Values

INSERT INTO table_name ('column1', 'column2', 'column3'...)

VALUES ('value1', 'value2', 'value3',...);


2. Using SELECT in INSERT INTO Statement

INSERT INTO first_table

SELECT * FROM second_table;

1 votes

Your Answer

Email Us: advertise@gdatamart.com

Donate Us: Support to GDATAMART

LifeStyle & Fun

© 2024 GDATAMART.COM (All Rights Reserved)