HW QUESTIONS - U4 T5 - Defining and Updating Tables Using SQL
HW QUESTIONS - U4 T5 - Defining and Updating Tables Using SQL
(b) Identify a foreign key in the tables above. What is the purpose of the foreign key? [2]
(c) Write an SQL statement to extract the passport numbers, surnames and firstnames of
all passengers on Flight BA401 on 12/11/2016. [5]
1
Homework 5 Defining and updating tables
Unit 4 Exchanging data
(f) Write an SQL statement to add two new columns for Telephone,
16 characters (variable length) and email, 20 characters (variable length) to the
Passenger table. [2]
(g) Write an SQL statement to delete the column email from the Passenger table. [2]
(h) Write an SQL statement to insert a record for passenger Jo Harris, passport number
12345678. [2]
TOTAL 25 marks