Databases Modifying Data with SQL Adding Data to a Database Adding Data With SQL

David Corrales
David Corrales
4,646 Points

Confused on this challenge! =[

We have an eCommerce database and it has a products table. It has the columns id, name, description and price.

Add a new product to the products table. Use any valid values you want. All columns are required. The id column is auto incrementing.

INSERT INTO products WHERE id, name, description, price = (4, "Joseph", "Break", 9);

2 Answers

KRIS NIKOLAISEN
PRO
KRIS NIKOLAISEN
Pro Student 51,836 Points

You'll also want to follow this syntax:

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

KRIS NIKOLAISEN
PRO
KRIS NIKOLAISEN
Pro Student 51,836 Points

If the id column is autoincrementing you can submit a value of null or leave the field out altogether

David Corrales
David Corrales
4,646 Points

Thank you! i will try it!