oracle8.1.6 insert into ttl_area_assignments (area_id, user_id) select :area_id, :user_id from dual where not exists (select 1 from ttl_area_assignments where user_id = :user_id and area_id = :area_id)