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 8052593
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T07:34:52+00:00 2026-06-05T07:34:52+00:00

I needed to find a value for a column in my oracle database but

  • 0

I needed to find a value for a column in my oracle database but i don’t know which
table or column it’s stored in

How can I search for a specific or like %% data as I do in

select * from SYS.dba_source

is there a table like that

Column Name ID  Data Type             Null?         Comments

OWNER   1   VARCHAR2 (30 Byte)       Y  
NAME    2   VARCHAR2 (30 Byte)       Y    Name of the object
TYPE    3   VARCHAR2 (12 Byte)       Y    

Type of the object:
"TYPE", "TYPE BODY", "PROCEDURE", "FUNCTION",
"PACKAGE", "PACKAGE BODY" or "JAVA SOURCE"

LINE    4   NUMBER                  Y    Line number of this line of source
TEXT    5   VARCHAR2 (4000 Byte)    Y    Source text
  • 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. Editorial Team
    Editorial Team
    2026-06-05T07:34:53+00:00Added an answer on June 5, 2026 at 7:34 am

    LINK: pl/sq to find any data in a schema

    Imagine, there are a few tables in your schema and you want to find a specific value in all columns within these tables. Ideally, there would be an sql function like

    select * from * where any(column) = 'value';
    

    Unfortunately, there is no such function.
    However, a PL/SQL function can be written that does that. The following function iterates over all character columns in all tables of the current schema and tries to find val in them.

      create or replace function find_in_schema(val varchar2) 
        return varchar2 is
          v_old_table user_tab_columns.table_name%type;
          v_where     Varchar2(4000);
          v_first_col boolean := true;
          type rc     is ref cursor;
          c           rc;
          v_rowid     varchar2(20);
    
        begin
          for r in (
            select
              t.*
            from
              user_tab_cols t, user_all_tables a
            where t.table_name = a.table_name
              and t.data_type like '%CHAR%'
            order by t.table_name) loop
    
            if v_old_table is null then
              v_old_table := r.table_name;
            end if;
    
            if v_old_table <> r.table_name then
              v_first_col := true;
    
              -- dbms_output.put_line('searching ' || v_old_table);
    
              open c for 'select rowid from "' || v_old_table || '" ' || v_where;
    
              fetch c into v_rowid;
              loop
                exit when c%notfound;
                dbms_output.put_line('  rowid: ' || v_rowid || ' in ' || v_old_table);
                fetch c into v_rowid;
              end loop;
    
              v_old_table := r.table_name;
            end if;
    
            if v_first_col then
              v_where := ' where ' || r.column_name || ' like ''%' || val || '%''';
              v_first_col := false;
            else
              v_where := v_where || ' or ' || r.column_name || ' like ''%' || val || '%''';
            end if;
    
          end loop;
          return 'Success';
        end;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For sequential search, what is the average number of comparisons needed to find a
I can't seem to find a way to return the value of the number
I'm trying to determine a way to find all words in a database table
I have an object which can have value as 3334.0 or 3 I need
I needed to find and use the coordinates of the intersection of a cubic
I looked and searched and couldn't find what I needed although I think it
Help with regular expressions needed. I'm trying using regular expressions and preg_match_all find blocks
I have googled this a little and didn't really find the answer I needed.
Needed Finfo but deleted msi package, so uninstalled php 5.3.0, downloaded 5.3.2 and installed.
I needed to update the system tray icon's text value, of my application, whenever

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.