Q

Converting Long Raw to Blob

Expert Greg Williams explains when and how to convert Long Raw to Blob using PL/SQL.

I have to migrate the data of Schema1.table1 to schema2.table2. The Long Raw column data is not getting migrated as expected. It is showing a numeric error. How do I do this using PL/SQL script?
Since long (raw) will be going away, in future releases of Oracle database, I would recommend that you convert your Long Raw to a Blob and your Long to Clob. Then you can migrate your table to another schema within the same database release or to a higher database release.

The following statement will convert your long raw to a Blob:

     ALTER TABLE long_tab MODIFY ( long_col bLOB );

Where the column long_col was a long raw datatype converted to a blob datatype.

Here's some more information on the advantages of using a lob over a long raw.

This was first published in February 2008

Dig deeper on Oracle development languages

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

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.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide

SearchDataCenter

SearchContentManagement

SearchFinancialApplications

Close