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

Mohammed El-Zein
Mohammed El-Zein
2,753 Points

Was expecting 7 entries not 6.

keeps saying error don't know why

Zack Mowrer
Zack Mowrer
Full Stack JavaScript Techdegree Graduate 56,382 Points

In which step does this error occur (eCommerce table, user table, or phone contact list)? Could you please show us the SQL code that you are trying to use?

Mohammed El-Zein
Mohammed El-Zein
2,753 Points

INSERT INTO phone_book (id, first_name, last_name, phone) VALUE (NULL, "MO", "EL-ZEIN", "123456")

1 Answer

Zack Mowrer
Zack Mowrer
Full Stack JavaScript Techdegree Graduate 56,382 Points

You need to use VALUES, not VALUE, when inserting data into a table. Also, I would set the id to some integer rather than NULL.

INSERT INTO phone_book (id, first_name, last_name, phone) VALUES (15, "MO", "EL-ZEIN", "123456")