INITCAP

Capitalizes first letter of each alphanumeric word and puts the rest in lowercase.

Behavior Type

Immutable

Syntax

INITCAP ( expression ) 

Parameters

expression

(VARCHAR) is the string to format.

Notes

  • Depends on collation setting of the locale.
  • INITCAP is restricted to 32750 octet inputs, since it is possible for the UTF-8 representation of result to double in size.

Examples

Expression

Result

SELECT INITCAP('high speed database');
High Speed Database
SELECT INITCAP('LINUX TUTORIAL');
Linux Tutorial
SELECT INITCAP('abc DEF 123aVC 124Btd,lAsT');
Abc Def 123Avc 124Btd,Last
SELECT INITCAP('');
 
SELECT INITCAP(null);