
SELECT emp_no, emp_name FROM employee
WHERE qual1 = 'BSc' OR qual2 = 'BSc' OR qual3 = 'BSc'
Using an array allows a more concise declaration:
CREATE TABLE employee
(emp_no CHAR(6),
emp_name VARCHAR(25),
qual VARCHAR(6) ARRAY(3))
This table could be searched in much the same way as before:
SELECT emp_no, emp_name FROM employee
WHERE qual(1) = 'BSc' OR qual(2) = 'BSc' OR qual(3) = 'BSc'
However, the use of an array permits a more concise statement:
SELECT emp_no, emp_name FROM employee
WHERE ANY qual = 'BSc'
The array data type is an example of an SQL collection type.
Questions
1. How would employee numbers, names and qualifications be represented in a fully ...