Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/oracle/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Oracle 将根据列名带来表名的查询_Oracle_Schema - Fatal编程技术网

Oracle 将根据列名带来表名的查询

Oracle 将根据列名带来表名的查询,oracle,schema,Oracle,Schema,可能重复: 我需要一个查询,它将带来oracle中包含该列名的表的名称 示例:假设我有表1列(a,b),表2列(b,c)和表3列(a,b,c,d),所以我需要知道哪些表包含c列,所以我需要一个查询,它将带来表名,我如何做到这一点 谢谢尝试从所有选项卡列中进行选择: select table_name from all_tab_columns where column_name = 'C' and table_name in ('table1','table2','table3') -- o

可能重复:

我需要一个查询,它将带来oracle中包含该列名的表的名称

示例:假设我有
表1
(a,b)
表2
(b,c)
表3
(a,b,c,d)
,所以我需要知道哪些表包含
c
列,所以我需要一个查询,它将带来表名,我如何做到这一点


谢谢

尝试从
所有选项卡列中进行选择

select table_name
from all_tab_columns 
where column_name = 'C' 
and table_name in ('table1','table2','table3') -- optional
and OWNER = 'owner'; -- optional

尝试从
所有选项卡列中选择:

select table_name
from all_tab_columns 
where column_name = 'C' 
and table_name in ('table1','table2','table3') -- optional
and OWNER = 'owner'; -- optional

我编辑了这篇文章,我希望它会更有帮助。我编辑了这篇文章,我希望它会更有帮助。