Querying oracle clob column

后端 未结 4 1814
别那么骄傲
别那么骄傲 2021-02-05 03:10

I have a table with a clob column. Searching based on the clob column content needs to be performed. However

select * from aTable where aClobColumn = \'value\';

4条回答
  •  盖世英雄少女心
    2021-02-05 03:28

    So do not. Because if you want to compare the data - then it may be a situation where one value: NULL and the second EMPTY_CLOB And it is for this method different matter! It returns -1, although in terms of data - both values ​​should not contain. Would be correct:

    dbms_lob.compare (NVL (AUDIT_PAYLOAD_TEXT_DEC, Empty_Clob ()),  NVL (AUDIT_PAYLOAD_TEXT, Empty_Clob ()))
    

提交回复
热议问题