SQL >> Base de Datos >  >> RDS >> PostgreSQL

Poner mayúscula inicial en PostgreSQL con INITCAP()

Objetivo

Normalizar nombres con mayúscula inicial y resto en minúscula.

Ejemplo

Tabla student con nombres inconsistentes.

SELECT INITCAP(full_name) AS new_full_name FROM student;

Cómo funciona

INITCAP() transforma cada palabra para que empiece en mayúscula y el resto quede en minúscula.