Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 72919
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T20:07:12+00:00 2026-05-10T20:07:12+00:00

Is it possible to search every field of every table for a particular value

  • 0

Is it possible to search every field of every table for a particular value in Oracle?

There are hundreds of tables with thousands of rows in some tables so I know this could take a very long time to query. But the only thing I know is that a value for the field I would like to query against is 1/22/2008P09RR8. <

I’ve tried using this statement below to find an appropriate column based on what I think it should be named but it returned no results.

SELECT * from dba_objects  WHERE object_name like '%DTN%' 

There is absolutely no documentation on this database and I have no idea where this field is being pulled from.

Any thoughts?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T20:07:13+00:00Added an answer on May 10, 2026 at 8:07 pm

    Quote:

    I’ve tried using this statement below to find an appropriate column based on what I think it should be named but it returned no results.*

    SELECT * from dba_objects WHERE object_name like '%DTN%' 

    A column isn’t an object. If you mean that you expect the column name to be like ‘%DTN%’, the query you want is:

    SELECT owner, table_name, column_name FROM all_tab_columns WHERE column_name LIKE '%DTN%'; 

    But if the ‘DTN’ string is just a guess on your part, that probably won’t help.

    By the way, how certain are you that ‘1/22/2008P09RR8’ is a value selected directly from a single column? If you don’t know at all where it is coming from, it could be a concatenation of several columns, or the result of some function, or a value sitting in a nested table object. So you might be on a wild goose chase trying to check every column for that value. Can you not start with whatever client application is displaying this value and try to figure out what query it is using to obtain it?

    Anyway, diciu’s answer gives one method of generating SQL queries to check every column of every table for the value. You can also do similar stuff entirely in one SQL session using a PL/SQL block and dynamic SQL. Here’s some hastily-written code for that:

        SET SERVEROUTPUT ON SIZE 100000      DECLARE       match_count INTEGER;     BEGIN       FOR t IN (SELECT owner, table_name, column_name                   FROM all_tab_columns                   WHERE owner <> 'SYS' and data_type LIKE '%CHAR%') LOOP          EXECUTE IMMEDIATE           'SELECT COUNT(*) FROM ' || t.owner || '.' || t.table_name ||           ' WHERE '||t.column_name||' = :1'           INTO match_count           USING '1/22/2008P09RR8';          IF match_count > 0 THEN           dbms_output.put_line( t.table_name ||' '||t.column_name||' '||match_count );         END IF;        END LOOP;      END;     / 

    There are some ways you could make it more efficient too.

    In this case, given the value you are looking for, you can clearly eliminate any column that is of NUMBER or DATE type, which would reduce the number of queries. Maybe even restrict it to columns where type is like ‘%CHAR%’.

    Instead of one query per column, you could build one query per table like this:

    SELECT * FROM table1   WHERE column1 = 'value'      OR column2 = 'value'      OR column3 = 'value'      ...      ; 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to search each and every pdf files on whole iphone.Is it possible
Is it possible to search for a stream not by StreamId but by some
Possible Duplicate: Search-like highlighting in NSTextView I thought i read here months ago that
Is it possible to search a string that is a regex, without escaping all
Is it possible to search on date ranges using Lucene in Java? How do
Is it possible to search the content of a std::ostringstream without using the std::ostringstream::str()
I am looking for a way (if possible) to search for apps from within
I have a question about IPTC metadata. Is it possible to search images that
Is it possible to find (search) in Dynamics AX 2009 for an exact match?
I am looking at the best possible approach to search and replace for a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.