select ims_md_id from ims_md_rights where ims_md_id = :ims_md_id update ims_md_rights set caor_s = :caor_s, caor_v = :caor_v where ims_md_id = :ims_md_id insert into ims_md_rights (ims_md_id, caor_s, caor_v) values (:ims_md_id, :caor_s, :caor_v) select caor_s, caor_v, ims_md_id from ims_md_rights where ims_md_id = :ims_md_id