insert into dotlrn_classes
(class_key, department_key)
values
(:class_key, :department_key)
delete from dotlrn_classes
where class_key = :class_key
select count(*)
from dotlrn_class_instances
where class_key = :class_key
select term_id
from dotlrn_class_instances
where class_instance_id = :class_instance_id
select count(*)
from dual
where exists (select 1
from dotlrn_departments)
select 1
from dotlrn_classes
where dotlrn_classes.class_key = :community_type_key
select count(*)
from dual
where exists (select 1
from dotlrn_terms
where dotlrn_terms.end_date > current_timestamp)