Aug 232013
 
select safe_educational_toys
from   parental_approved_toys
intersect
select dangerous_objects
from   babys_chosen_playthings;

no rows selected

To be fair, they do like their "proper" toys. Somehow the forbidden objects seem so much more appealing though!

Keep reading for scripted examples

create table parental_approved_toys (
  safe_educational_toys varchar2(30)
);

create table babys_chosen_playthings (
  dangerous_objects varchar2(30)
);

insert into parental_approved_toys
values ('Soft squishy toys');

insert into parental_approved_toys
values ('Educational toy centres');

insert into babys_chosen_playthings
values ('Live electric wires');

insert into babys_chosen_playthings
values ('Sharp pointy things');

insert into babys_chosen_playthings
values ('Small, choke inducing objects');

insert into babys_chosen_playthings
values ('Heavy, skull crushing implements');

select safe_educational_toys
from   parental_approved_toys
intersect
select dangerous_objects
from   babys_chosen_playthings;

drop table parental_approved_toys purge;
drop table babys_chosen_playthings purge;

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)