This content has been marked as final. Show 3 replies
Use the TREAT function to access the object as a TRAILER_TY instance and read its specific attributes.
For example, the following retrieves the REF pointer of film #1 in a subquery and uses it in a filter predicate to access the corresponding trailer :
delete entertainment where object_value is of (trailer_ty) and treat(object_value as trailer_ty).of_film = ( select ref(t) from film t where t.film_id = 1 ) ;