Home > database >  How to acquire by querying the table space contains a particular character all the table names?
How to acquire by querying the table space contains a particular character all the table names?

Time:09-22

How to acquire by querying the table space contains a particular character all the table names? For the oracle database, thank you!

CodePudding user response:

dba_tables

CodePudding user response:

reference 1st floor minsic78 response:
dba_tables

Add: if your table also includes the partition table, plus dba_tab_partitions and best dba_tab_subpartitions

CodePudding user response:

Select * from dba_tables where tablename like and tablespce_name=

CodePudding user response:

I want to find the table contains all the tables for a specific string in the table name, not table name contains special characters, please under the guidance of thank you!

CodePudding user response:

Each line is dynamic SQL, loop through the output,
 select Max (str1) | | 
Max (ext_str) | |
The replace (replace (to_char (wm_concat (str2)), ', ', '), '$* | |', ', ') | |
')
The from (
Select the 'select Max ("' | | t1. The OWNER | | ', '| | t1, TABLE_NAME | |' ' ') from the '| | t1. The OWNER | |'. '| | t1. TABLE_NAME | |' where 1=1 and the exists (' str1,
'or instr (' | | t1. COLUMN_NAME | |', '| |' $* | | 'string' ' '| |') & gt; 0 'str2,
'select 1 from' | | t1. The OWNER | | '. '| | t1, TABLE_NAME | |' where 1=2 'ext_str,
T1. The OWNER | | '| | t1, TABLE_NAME part_str
The from all_tab_columns t1
Where a t1. The OWNER=upper (" user_name ")
-- and t1. TABLE_NAME=upper (" TABLE_NAME ")
) t1
Group by part_str
;

CodePudding user response:

Didn't understand what's this demand,

CodePudding user response:

What do you want to query the table, which fields to store a particular value?

CodePudding user response:

The
refer to the original poster ZGZCS response:
how to acquire by querying the table space contains a particular character all the table names? For the oracle database, thank you!

Get a table space contains all the table name of a particular character: please give a concrete example, otherwise we can only guess,
  • Related