Which of the following commands contains an error?

Question 2 options:

CREATE vehicletype (carid INTEGER PRIMARY KEY, typeofvehicle TEXT, manufacturer TEXT, year INTEGER);

INSERT INTO vehicletype VALUES (1,"truck","Ford",2000);

SELECT * FROM vehicletype;

Respuesta :

Answer:

The very first command contains an error.

Explanation:

The create query is used to create the table in the database. The syntax of the create query is :

create table tablename(column1 datatype,column2 datatype ........columnn datatype);

So there is a keyword table is missing in the given query. so it is incorrect query.

INSERT INTO vehicletype VALUES (1,"truck","Ford",2000); This query is correct.

SELECT * FROM vehicletype; This query is also correct.