Skip to content

Latest commit

 

History

History
23 lines (18 loc) · 530 Bytes

capitalize-all-the-words.md

File metadata and controls

23 lines (18 loc) · 530 Bytes

Capitalize All The Words

PostgreSQL provides the string function initcap() as a way of capitalizing all words. In the process, it cleans up the casing of the remaining parts of the words.

Here are some examples of how it works.

> select initcap('hello, world');
   initcap
--------------
 Hello, World

> select initcap('HELLO, WORLD');
   initcap
--------------
 Hello, World

See the String Functions and Operators docs for more details.