SELECT atc.TABLE_NAME ,atc.COLUMN_NAME ,atc.DATA_TYPE ,CASE DATA_TYPE WHEN 'VARCHAR2' THEN '(' || DATA_LENGTH || ')' WHEN 'NUMBER' THEN CASE WHEN DATA_PRECISION IS NOT NULL THEN '(' || DATA_PRECISION || CASE WHEN DATA_SCALE <> 0 THEN ',' || DATA_SCALE END END || CASE WHEN DATA_PRECISION IS NOT NULL THEN ')' END END DATA_LENGTH FROM all_tab_columns atc WHERE atc.TABLE_NAME = '<Table Name>';
Last Updated on October 26, 2015