Home >Database >Oracle >How to query the table structure in oracle

How to query the table structure in oracle

青灯夜游
青灯夜游Original
2022-01-07 17:26:2042249browse

Oracle query table structure method: 1. In the command window, execute the "DESC table_name;" statement; 2. In the sql window, execute "SELECT DBMS_METADATA.GET_DDL('TABLE','data table name ') FROM DUAL;" statement.

How to query the table structure in oracle

The operating environment of this tutorial: Windows 7 system, Oracle 11g version, Dell G3 computer.

How to view the table structure in Oracle

Method 1: Enter

in the command window

DESC table_name; Enter

##Method 2:

In the sql window Next

SELECT DBMS_METADATA.GET_DDL('TABLE','table_name大写') FROM DUAL;

[Note: Method 2 must ensure that the target table belongs to the currently logged in user, otherwise the results will not be found]

Recommended tutorial: "

Oracle Tutorial"

The above is the detailed content of How to query the table structure in oracle. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn