Exam-style question
Try this first
Which SQL statement defines a table named Book with an integer BookID column and a text Title column?.
- A.CREATE TABLE Book (BookID INT, Title VARCHAR(100));
- B.DEFINE Book (BookID INT, Title VARCHAR(100));
- C.INSERT TABLE Book (BookID INT, Title VARCHAR(100));
- D.CREATE Book TABLE (BookID INT, Title VARCHAR(100));
Model answer
What a good answer should say
- CREATE TABLE Book (BookID INT, Title VARCHAR(100));
Explanation
Why this works
CREATE TABLE defines a new table. Each column is given a name and a data type inside the brackets.
Common mistake
No common mistake is linked to this question yet.
