DESC: Method for listing field names only

Source: Internet
Author: User

In many cases, we need a table field list, such as the write control file CTL...

DESC does not have a parameter to list only its NAME

No. Let's access its dictionary table.

USER_TAB_COLS

USER_TAB_COLUMNS

SQL> select column_name from user_tab_columns s where table_name = 't_ CACHE_ZCPROJECT ';

It is often found that the sorting of COLUMN_NAME is different from that of DESC T_CACHE_ZCPROJECT.

By default, it is LAST_ANALYZED sorting.

Order By s. COLUMN_ID is the same as DESC.

In the PL/SQL developer query window, you can directly copy data. If SQL plus is used for processing

Set linesize 80
Set describe depth 2
SET DESCRIBE INDENT ON
SET DESCRIBE LINE OFF

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.