Skip to main content

Activity 2.2A

1

Producing Reports

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: student number and full name details of all students

Report 2: student numbers, full names and date of births of female students

Report 1

SELECT student_number, title, forename, surname

FROM student;

Output from the SELECT student_number, title, forename, surname[D]

Report 2

SELECT student_number, title, forename, surname

FROM student

WHERE gender = 'F';

Output from the SELECT student_number, title, forename, surname FROM student WHERE gender = 'F'; command

Check your answer

Next: Activity 2.2B