////////////////////////////////////////////////////////////////////
// Beispiel 9:
// Eine von DEPTS abgeleitete Virtab, die berechnete Viewspalten
// enthaelt.
// Es wird MODFIES, CALCULATES und WITHOUT demonstriert.
VIRTUALTABLE DEPTSINFO MODIFIES DEPTS
COLUMN DEPT_PER_LOC CALCULATES // Unterabfrage!
select count(*) from department
where department.location_id = location.location_id
;
VIRTUALTABLE DEPTSINFO1 MODIFIES DEPTSINFO
WITHOUT COLUMN DEPT_PER_LOC
COLUMN LOC_PER_DEPT CALCULATES // Unterabfrage!
1 / (select count(*) from department
where department.location_id = location.location_id)
;
|