How to process the LONG type in ORACLE

Source: Internet
Author: User

1. Process in block:

 

However, PL/SQL code can only process data up to 32 KB. If this limit is exceeded, PL/SQL cannot be used for processing.

SQL> SET SERVEROUT ON

SQL> BEGIN
2 for I IN (SELECT * FROM T_LONG) LOOP
3 if instr (I. LONG_COL, 'World')> 0 THEN
4 DBMS_OUTPUT.PUT_LINE (I. ID );
5 end if;
6 end loop;
7 END;
8/

 

2. query syntax for full-text index:

 

SQL> CREATE INDEX IND_T_LONG_COL ON T_LONG (LONG_COL) INDEXTYPE IS CTXSYS. CONTEXT;

The index has been created.

SQL> SELECT ID FROM T_LONG WHERE CONTAINS (LONG_COL, 'World')> 0;

ID
----------
1

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.