Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1CREATE TABLE Students (ID INT, Name TEXT); | AINSERT INTO Pets VALUES (2, 'Rex'); | |
| 2INSERT INTO Students VALUES (1, 'Mia'); | BAdds one new record to the Students table with ID 1 and Name Mia. | |
| 3A PRIMARY KEY field gives every record a unique ID, and it is set when the table is created. | CCREATE TABLE Pets (PetID INT PRIMARY KEY, Name TEXT); | |
| 4Text values are put in quotes, and numbers are not, when adding a record. | DThe word TABLE is missing. It should be CREATE TABLE Students (...). | |
| 5CREATE Students (ID INT, Name TEXT); | EBuilds a new table called Students with two fields: ID that holds whole numbers and Name that holds text. | |
| 6INSERT INTO Students VALUES (3, Zoe); | FThe text value Zoe needs quotes. It should be 'Zoe'. |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
CREATE TABLE — SQL command that builds a new table by naming its fields and their data types, such as a PRIMARY KEY. INSERT INTO ... VALUES then adds one record to that table.CREATE TABLE Students (
StudentID INT PRIMARY KEY,
Name TEXT);CREATE TABLE Books (
BookID INT PRIMARY KEY,
Title TEXT);INSERT INTO Students (StudentID, Name)
VALUES (1, 'Mia');INSERT INTO Books (BookID, Title)
VALUES (1, 'Holes');CREATE TABLE Pets (
PetID INT PRIMARY KEY,
Name TEXT);