Implementation test questions

1

What language is used to create database queries?

2

Which of the following SQL statements could you use If you want to select the username, e-mail and postcode fields from a table named ‘users’?

3

Which of the following would be returned if this command were executed?

SELECT PupilID, Surname, Class FROM Pupil

WHERE Class = ‘1T1’;

4

Which SQL keyword is used to return results in a specific order?

5

What would need to be added to this SQL example to sort the data by class in ascending order and merit points in descending order?

6

Which statement would be used to add a new record using SQL?

7

What would happen if this SQL command were used?

UPDATE Pupil

SET PastoralCareTeacher = ‘Mr Gilchrist’

WHERE PastoralCareTeacher = ‘Miss Armstrong’;

8

What name is given to the join that would return results as part of a query where the value of a primary key in one table is equal to the value of a foreign key in another?