oracle
8.1.6
update cr_revisions
set content = empty_blob()
where revision_id = :revision_id
returning content into :1
update $lob_table
set $lob_attribute = empty_clob()
where $lob_id_column = :revision_id
returning $lob_attribute into :1
select item_id
from cr_revisions
where revision_id = :revision_id
update cr_revisions
set content_length = lob_length(lob)
where revision_id = :revision_id
update cr_revisions
set filename = :filename,
mime_type = :mime_type,
content_length = :tmp_size
where revision_id = :revision_id
select storage_area_key,
filename
from cr_items ci,
cr_revisions cr
where cr.item_id=ci.item_id
and cr.revision_id=:revision_id