sql insert all columns code example
Example 1: insert select
INSERT INTO table2
SELECT * FROM table1
WHERE condition;
Example 2: sql insert to values
INSERT INTO name (...)
VALUES (...)
Used alongside the INSERT INTO keyword to add new values to a table.
Example: Adds a new car to the cars table.
INSERT INTO cars (name, model, year)
VALUES ('Ford', 'Fiesta', 2010);