Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Quiz 2
Weight = 5% of course
Student ID: __________________________
Full Name: __________________________
1. [1 mark] Write down the SQL select statement needed to get all columns from a
table called Flight.
select * from Flight;
2. [1 mark] Write down the SQL select statement needed to get all columns from a
table called Flight where the column destination is Sydney.
select * from Flight where destination like '%Sydney%';
3. [1 mark] Write down the SQL select statement needed to get the columns
flight_num, destination, and origin from a table called Flight.
select flight_num, destination, origin from Flight;
4. [1 mark] Write down the SQL select statement needed to get the columns
flight_num, destination, and origin from a table called Flight where flight_num is
123, destination is Brisbane, and origin is Melbourne.
select flight_num, destination, origin from Flight where flight_num = '123'
and destination like '%Brisbane%' and origin like '%Melbourne%'
5. [1 mark] Write down the SQL select statement needed to get all columns from a
table called Flight where the destination is either Melbourne or Sydney.
select * from Flight where destination like '%Melbourne%' or destination like
'%Sydney%';
1621ICT Quiz 2
Weight = 5% of course
Student ID: __________________________
Full Name: __________________________
1. [1 mark] Write down the SQL select statement needed to get all columns from a
table called Room.
select * from Room;
2. [1 mark] Write down the SQL select statement needed to get all columns from a
table called Room where the column location is Nathan.
select * from Room where location = 'Nathan';
3. [1 mark] Write down the SQL select statement needed to get the columns location,
capacity, and type from a table called Room.
select location, capacity, type from Room;
4. [1 mark] Write down the SQL select statement needed to get the columns location,
capacity, and type from a table called Room where capacity is at least 15, location is
Nathan, and type is Computer Lab.
select location, capacity, type from Room where capacity >= 15 and location like
'%Nathan%' and type like '%computer lab%'
5. [1 mark] Write down the SQL select statement needed to get all columns from a
table called Room where the location is either Nathan or Mt Gravatt.
select * from Room where location like '%Nathan%' or location like '%Mt Gravatt%'