Using the solution to Activity 1.5, found in the previous section, develop a command file to create the student table and insert records into that table. Use SQL to display the entered rows.
Produce the following reports:
Report 1: a list of those students (i.e. numbers and full names) for whom date of births are not recorded - sort the results by surname
Report 2: a list of those students (i.e. numbers and full names, together with their date of births) whose names start with the letter J, have a student number in the range 'L0001000' and 'L0002000' and whose date of births are recorded.
SELECT student_number, title, forename, surname
WHERE date_of_birth IS NULL ORDER BY surname;
SELECT student_number, title, forename, surname, date_of_birth
WHERE surname LIKE 'J%'
AND student_number BETWEEN 'L0001000' AND 'L0002000'
AND date_of_birth IS NOT NULL;
(c) SQA 2009