User Tools

Site Tools


kurs:simpsons
/* Formatted on 2008/09/30 21:07 (Formatter Plus v4.8.7) */
SELECT isa.per_name || ' ist ein ' ||  relation_type.ret_name ||' von '|| persons.per_name
  FROM persons, relations, persons isa, relation_type
 WHERE (    (persons.per_id = relations.rel_parent)
        AND (isa.per_id = relations.rel_child)
        AND (relation_type.ret_id = relations.rel_ret_id)
       )

insert

insert into relations (
REL_ID,    
REL_PARENT,
REL_CHILD,
REL_RET_ID)
values (
sim.nextval,
(select per_id from persons where per_name = 'Bart'),
(select per_id from persons where per_name = 'Homer'),
(select ret_id from relation_type where ret_name = 'Elternteil'));
kurs/simpsons.txt · Last modified: 2014/09/10 21:22 (external edit)