CREATE TABLE Products (
ProductID Number (TEN) is not NULL,
Name VARCHAR2 (255),
Description CLOB);
Query statement:
Select T.productid, t.name from Products t
where Dbms_lob.instr (t.description, ' AAA ', 1, 1) > 0;
In Oracle, you can use the InStr function to judge a string to determine whether it contains the specified character. Its syntax is:
InStr (Sourcestring,deststring,start,appearposition).
Where sourcestring represents the source string; Deststring represents the substring to be found in the source string; Start represents the start position of the lookup, which is optional and defaults to 1 The Appearposition representative wants to find out the first occurrence of the deststring from the source character, which is also optional and defaults to 1;
If the value of start is a negative number, then the representation is looked up from right to left.
The return value is: The location of the found string.
Oracle CLOB like