insert into portal_element_parameters
(parameter_id, element_id, configured_p, key, value)
select :parameter_id, :element_id, 't', :key, :value
from dual
where not exists (select parameter_id
from portal_element_parameters
where element_id = :element_id
and key = :key
and value= :value)
delete
from portal_element_parameters
where element_id = :element_id
and key = :key
and value = :value
delete
from portal_element_parameters
where element_id = :element_id
and key = :key
select value
from portal_element_parameters
where element_id = :element_id
and key = :key
update portal_element_parameters
set value = :value
where element_id = :element_id
and key = :key
select key,
value
from portal_element_parameters
where element_id = :element_id