Search all varchar columns in table and output the row - oracle

I need an assistance with regards to related to building a PL-SQL block related to the following query:

SELECT <PRIMARY_KEY_COLUMN>, <VARCHAR_COLUMN> FROM TABLENAME WHERE REGEXP_LIKE(VARCHAR_COLUMN, UNISTR('[\D800-\DFFF]'));

The above query will give an output related to all the UTF8 bytes that are mentioned in the range.

I would request your guys to help me with modifying the above query, so that I can run the above query on all the VARCHAR/CLOB columns in the table and get an output like this:

ColumnName                   Value                 Primary_key_Column
-----------------------------------------------------------------------
Col1                         v1                     123
Col1                         v2                     124
.
.
Col2                         v1                     167
Col2                         v2                     123
.
.

Kindly review and please share your comments.

0 Comment

NO COMMENTS

LEAVE A REPLY

Captcha image