View columns in table
Step
To view the columns in a table, run the following command:
./pdbctl listcolumns -a <database_user_alias> -t <table_name>
Flag Description
The following table describes the flags associated with this command:
Flag | Data Type | Description |
---|---|---|
-a | string | Database alias associated with the database user. |
-h | Flag to view help for the listcolumns command. | |
-t | string | Name of table for which columns will be listed. |
-- verbose | Print verbose logs. |
Example
The following sample command lists the columns in the table CUSTOMERS associated with alias demo:
./pdbctl listcolumns -a demo -t CUSTOMERS
Output
---------------------------------------------
Column name: CUSTOMER_ID
Column type: NUMBER
Column width: 10
---------------------------------------------
---------------------------------------------
Column name: CUSTOMER_NAME
Column type: VARCHAR2
Column width: 50
---------------------------------------------
---------------------------------------------
Column name: CITY
Column type: VARCHAR2
Column width: 50
---------------------------------------------