Q
Problem solve Get help with specific problems with your technologies, process and projects.

Query to select CLOB field

I want a simple query to get the output of a clob type field in Oracle. I have inserted text ("this is a test for clob") in the clob field. How to select this?

I want a simple query to get the output of a clob type field in Oracle. I have inserted text ("this is a test for...

clob") in the clob field. How to select this?

Querying from a table with a datatype of CLOB is the same as querying from a table with a varchar2 datatype. In the listing below I create a table with a CLOB datatype field called DESCRIPTION. Then, I insert into my table and select the description field that's a CLOB:


SQL> Create table documents (id number, name varchar2(100), description clob); SQL> insert into documents values (1, 'Test Clob', 'This is a clob text in a clob data field'); 1 row created. SQL> select description from documents; DESCRIPTION ---------------------------------------------------------------------------- This is a clob text in a clob data field

Dig Deeper on Using Oracle PL-SQL

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide.com

SearchDataCenter

SearchContentManagement

SearchHRSoftware

Close