Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2007
    Posts
    25

    Unanswered: How to pull Usertable,UserTabColumns data from other databases.

    Hi All,

    I'm trying to see which tables in my oracle database have the phonenumber field, but I can only run the following query against the default database. I would like to run the following query against other databases. Any ideas how I can do this?

    SELECT ut.table_name,ut.num_rows,utc.column_name,utc.data _type,utc.data_length
    FROM USER_TABLES ut, USER_TAB_COLUMNS utc
    WHERE ((ut.table_name = utc.table_name) AND (utc.column_name LIKE '%PHONE%'))

    Thanks.

    Matt

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >but I can only run the following query against the default database.
    If you really mean schema, not "database", then do as below

    SELECT ut.table_name,ut.num_rows,utc.column_name,utc.data _type,utc.data_length
    FROM DBA_TABLES ut, DBA_TAB_COLUMNS utc
    WHERE ((ut.table_name = utc.table_name) AND (utc.column_name LIKE '%PHONE%'))
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •