Sql insert data in a table

This article is tagged with: Sql insert data in a table and mysql

SQL INSERT DATA IN A TABLE

INSERT INTO table2
SELECT * FROM table1
WHERE condition;

SQL INSERT DATA IN A TABLE

INSERT INTO Customers (CustomerName, City, Country)
VALUES ('Cardinal', 'Stavanger', 'Norway');

SQL INSERT DATA IN A TABLE

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

SQL INSERT DATA IN A TABLE

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

SQL INSERT DATA IN A TABLE

INSERT INTO table2 (column1, column2, column3, ...)
SELECT column1, column2, column3, ...
FROM table1
WHERE condition;

This article is tagged with: Sql insert data in a table and mysql