oracle 如何在oracle中显示表中的字段?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1625927/
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-18 19:17:37  来源:igfitidea点击:

How do I show fields in a table in oracle?

sqloracle

提问by spig

In mysql I can write

在mysql中我可以写

show fields from <table>;

What is the closest equivalent in Oracle SQL?

Oracle SQL 中最接近的等价物是什么?

回答by Otávio Décio

Use DESCRIBE table.

使用 DESCRIBE 表。

回答by Vincent Malgrat

In Oracle you can query the dictionary views to get info on the schema objects, for instance:

在 Oracle 中,您可以查询字典视图以获取有关架构对象的信息,例如:

SELECT * FROM all_tab_columns WHERE table_name = 'MY_TABLE';

alternatively in SQL*Plus you could use the DESCRIBEcommand:

或者,在 SQL*Plus 中,您可以使用以下DESCRIBE命令:

DESC my_table