Skip to Main Content
Data Analysis for Database Design, 3rd Edition
book

Data Analysis for Database Design, 3rd Edition

by David Howe
May 2001
Intermediate to advanced content levelIntermediate to advanced
336 pages
14h 36m
English
Butterworth-Heinemann
Content preview from Data Analysis for Database Design, 3rd Edition
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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Data Quality Engineering in Financial Services

Data Quality Engineering in Financial Services

Brian Buzzelli

Publisher Resources

ISBN: 9780750650861