Skip to content Skip to sidebar Skip to footer

Help Me Understand The Difference Between Clobs And Blobs In Oracle

This is mainly just a 'check my understanding' type of question. Here's my understanding of CLOBs and BLOBs as they work in Oracle: CLOBs are for text like XML, JSON, etc. You s

Solution 1:

CLOB is encoding and collation sensitive, BLOB is not.

When you write into a CLOB using, say, CL8WIN1251, you write a 0xC0 (which is Cyrillic letter А).

When you read data back using AL16UTF16, you get back 0x0410, which is a UTF16 represenation of this letter.

If you were reading from a BLOB, you would get same 0xC0 back.

Solution 2:

Your understanding is correct. Since you mention Python, think of the Python 3 distinction between strings and bytes: CLOBs and BLOBs are quite analogous, with the extra issue that the encoding of CLOBs is not under your app's control.

Post a Comment for "Help Me Understand The Difference Between Clobs And Blobs In Oracle"