select count(*)
from recruiting_assignment_emails
where package_id = :package_id
select email_body
from recruiting_assignment_emails
where package_id = :package_id
select email_body
from recruiting_assignment_emails
where package_id is null
update recruiting_assignment_emails
set email_body = :default_email
where package_id = :package_id
insert into recruiting_assignment_emails
(package_id,
email_body)
values (:package_id,
:default_email);