Last updated
SQL INSERT INTO
Definition: INSERT INTO adds a new row of data to a table. You name the columns, then provide matching values.
Example 1 — add a customer
INSERT INTO Customers (CustomerID, CustomerName, Country, City, Age) VALUES (9, 'New Cafe', 'Italy', 'Rome', 30);
Example 2 — see your new row
Run the insert and a SELECT together to confirm it worked:
INSERT INTO Customers (CustomerID, CustomerName, Country, City, Age) VALUES (9, 'New Cafe', 'Italy', 'Rome', 30); SELECT * FROM Customers WHERE CustomerID = 9;
The values must line up with the columns, in the same order. Text goes in single quotes; numbers do not.
💡 Safe to practise: the sample database resets every Run, so your inserted row disappears next time — experiment all you like.
Try it Yourself
Output
Ad · responsive