I am currently validating an application developed on Oracle for DB2. Since we don't want to maintain two separate sources, I need some query to insert blob into a field, that works in both oracle and db2. I don't have any identifier to distinguish under which DB the application is running.
I used utl_raw.cast_to_raw
in oracle and CAST() as BLOB
in DB2 which are mutually incompatible.