Implementation test questions

1

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’?

2

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

SELECT PupilID, Surname, Class FROM Pupil

WHERE Class = ‘1T1’;

3

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

4

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?

5

What would happen if this SQL command were used?

UPDATE Pupil

SET Pastrol Care Teacher = ‘Mr Gilchrist’

WHERE Pastoral Care Teacher = ‘Miss Armstrong’;

6

What would the wildcard ‘Da%’ return?

7

Which of the following aggregate functions could be used to show how often something occurs in a database?

8

What field is most likely to be a computed field with an alias in the following table?

productNameproductPrice (a)numberSold (b)grossincome (c)
Pizza12.901441857.60
Coffee3.4635121.1