列出 oracle 中用户视图的列名
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7844979/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 03:38:50 来源:igfitidea点击:
List column name for user views in oracle
提问by Navaneethan
What is the Query for list the column names for user created views in Oracle?
Oracle 中用户创建视图的列名查询是什么?
采纳答案by Justin Cave
SELECT
table_name,
column_name,
data_type
FROM all_tab_columns
WHERE table_name = 'VIEWNAME'
AND owner = 'OWNER'
ORDER BY column_id
You can also use USER_TAB_COLUMNS
and/or DBA_TAB_COLUMNS
depending on your privileges and whether you have permission to query the view.
您还可以使用USER_TAB_COLUMNS
和/或DBA_TAB_COLUMNS
取决于您的权限以及您是否有权查询视图。
回答by Geo
SELECT
*
FROM
ALL_TAB_COLUMNS
WHERE
TABLE_NAME = 'your_view_name'
回答by rahularyansharma
SELECT table_name, column_name, data_type, data_length
FROM USER_TAB_COLUMNS
WHERE table_name = 'MYTABLE'