Still use to write something else
CodePudding user response:
Desc is up sqlplus command, you can use the dbms_metadata. Get_ddl functionCodePudding user response:
Select * from col can also view the column informationCodePudding user response:
Desc is in the select query, descending order according to a certain field; Do you want to view the table structure of a table, you can use the following query to see a table of table structureSELECT tc OLUMN_NAME, T.D ATA_TYPE, T.D ATA_LENGTH, CASE T.N ULLABLE WHEN 'N' THEN 'no' WHEN 'Y' THEN 'is' END NULLABLE,
C.COM MENTS FROM USER_TAB_COLUMNS T, USER_COL_COMMENTS C
WHERE T.T ABLE_NAME=C.T ABLE_NAME AND tc OLUMN_NAME=Arthur c. OLUMN_NAME AND T.T ABLE_NAME=UPPER (' do you want to check the table name ')
CodePudding user response:
With this, the most professional, most comprehensive,SELECT * FROM USER_TAB_COLUMNS T WHERE T.T ABLE_NAME='table' ORDER BY tc OLUMN_ID;
If the permission is enough big, can use ALL_TAB_COLUMNS or DBA_TAB_COLUMNS,
CodePudding user response:
Desc table name; Or show create table table name;