Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

This command was used to create a table: CREATE TABLE vehicletype (carid INTEGER

ID: 3885607 • Letter: T

Question

This command was used to create a table:
CREATE TABLE vehicletype (carid INTEGER PRIMARY KEY, typeofvehicle TEXT, manufacturer TEXT);

Which of the following would correctly add a row of data to the table?

Question 4 options:

INSERT INTO VALUES (1,”truck”,”Chevrolet”);

INSERT INTO vehicletype VALUES (1, truck, Chevrolet);

INSERT INTO vehicletype (1, “truck”, “Chevrolet”);

INSERT INTO vehicletype VALUES(1, “truck”, “Chevrolet”);

INSERT INTO VALUES (1,”truck”,”Chevrolet”);

INSERT INTO vehicletype VALUES (1, truck, Chevrolet);

INSERT INTO vehicletype (1, “truck”, “Chevrolet”);

INSERT INTO vehicletype VALUES(1, “truck”, “Chevrolet”);

Explanation / Answer

Out of all the 4 statements , the below query will correctly add a row to table:

INSERT INTO vehicletype VALUES(1, “truck”, “Chevrolet”);

Note: The text fields values must be kept in " " ( as per the above query) . Also the clause VALUES is must in INSERT qeury statement.

So, the only query that will correctly add a row to table is option 4.