Database Fundamentals — Question 101

Remo works as a Database Designer for Tech Inc.
He wants to create a table named Product.
He issues the following query to create the Product table:
CREATE Product (
ProductID Char (10) NOT NULL,

OrderID Char (10) NULL -
ProductName Varchar NOT NULL,
Primary key (OrderID, ProductID))
What are the errors in the above query? Each correct answer represents a complete solution. (Choose two.)

Answer options

Correct answer: A, D

Explanation

Option A is correct because primary keys must contain unique and non-null values, making it invalid to have NULLs in a primary key. Option D is also correct since declaring ProductName as Varchar requires a specified width, which is missing. Options B and C are incorrect as they do not pertain to the errors present in the SQL command.