Skip to content

Instantly share code, notes, and snippets.

@woosungchu
Created January 20, 2017 07:49
Show Gist options
  • Select an option

  • Save woosungchu/a75733959d959f45abbf084ad7c5aa4f to your computer and use it in GitHub Desktop.

Select an option

Save woosungchu/a75733959d959f45abbf084ad7c5aa4f to your computer and use it in GitHub Desktop.
SELECT
TABLE_NAME,
COLUMN_NAME,
CASE DATA_TYPE
WHEN 'NUMBER' THEN DATA_TYPE || '(' || DATA_PRECISION || ',' || DATA_SCALE || ')'
WHEN 'DATE' THEN DATA_TYPE
WHEN 'VARCHAR2' THEN DATA_TYPE || '(' || DATA_LENGTH || ')'
ELSE DATA_TYPE
END
DATA_TYPE, NULLABLE, DATA_DEFAULT, COLUMN_ID FROM ALL_TAB_COLUMNS
WHERE OWNER='MPOWN'
;
select * from ALL_TAB_COLUMNS
where rownum =1 ;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment