By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
CREATE TABLE table_name (a INTEGER, b NUMBER(*, 0), c NUMBER(38));
SELECT column_name, data_type, data_length, data_precision, data_scale
FROM user_tab_cols
WHERE table_name = 'TABLE_NAME';
COLUMN_NAME | DATA_TYPE | DATA_LENGTH | DATA_PRECISION | DATA_SCALE |
---|---|---|---|---|
A | NUMBER | 22 | null | 0 |
B | NUMBER | 22 | null | 0 |
C | NUMBER | 22 | 38 | 0 |
SELECT dbms_metadata.get_ddl('TABLE', 'TABLE_NAME', USER)
FROM DUAL;
DBMS_METADATA.GET_DDL('TABLE','TABLE_NAME',USER) |
---|
CREATE TABLE "FIDDLE_OXTWLFQGMTFGQQDVVOHO"."TABLE_NAME" ( "A" NUMBER(*,0), "B" NUMBER(*,0), "C" NUMBER(38,0) ) SEGMENT CREATION DEFERRED PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING TABLESPACE "USERS" |