Friday, May 8, 2020

Oracle: Capitalizing and removing underscores from a column name

Oracle table names are all caps with underscores.  So if you're consuming them from something like all_tab_columns, this quick little function makes them a little prettier. 

select initcap(replace(lower('SOME_COLUMN_NAME'),'_',' ')) from dual;

No comments:

Post a Comment