Title: INITCAP in PostgreSQL: Title-Casing Strings the Right Way
Open Graph Title: INITCAP in PostgreSQL: Title-Casing Strings the Right Way
X Title: INITCAP in PostgreSQL: Title-Casing Strings the Right Way
Description: INITCAP in PostgreSQL: capitalize each word, title-case names, the apostrophe, hyphen and locale gotchas, plus how to emulate it in MySQL.
Open Graph Description: INITCAP in PostgreSQL: capitalize each word, title-case names, the apostrophe, hyphen and locale gotchas, plus how to emulate it in MySQL.
X Description: INITCAP in PostgreSQL: capitalize each word, title-case names, the apostrophe, hyphen and locale gotchas, plus how to emulate it in MySQL.
Keywords:
Opengraph URL: https://sql.coderang.dev/en/blog/sql-initcap
Domain: sql.coderang.dev
IPv4 address: 79.137.205.149
{"@context":"https://schema.org","@type":"Organization","@id":"https://sql.coderang.dev/#organization","name":"SQL Arena","url":"https://sql.coderang.dev","logo":{"@type":"ImageObject","url":"https://sql.coderang.dev/android-chrome-192x192.png","width":192,"height":192},"sameAs":["https://t.me/coderang"],"description":"SQL Arena is an interactive SQL training platform — a practice arena, duels, a reference handbook and tutorials for analysts and backend developers."}
{"@context":"https://schema.org","@type":"WebSite","name":"SQL Arena","url":"https://sql.coderang.dev","inLanguage":"en-US","publisher":{"@id":"https://sql.coderang.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":"https://sql.coderang.dev/trainer/tasks?search={search_term_string}","query-input":"required name=search_term_string"}}
{"@context":"https://schema.org","@type":"TechArticle","headline":"INITCAP in PostgreSQL: Title-Casing Strings the Right Way","description":"INITCAP in PostgreSQL: capitalize each word, title-case names, the apostrophe, hyphen and locale gotchas, plus how to emulate it in MySQL.","image":{"@type":"ImageObject","url":"https://sql.coderang.dev/og?lang=en&title=INITCAP%20in%20PostgreSQL%3A%20Title-Casing%20Strings%20the%20Right%20Way","width":1200,"height":630},"datePublished":"2026-06-19T02:55:51.993Z","dateModified":"2026-06-19T11:28:22.000Z","author":{"@type":"Organization","@id":"https://sql.coderang.dev/#organization","name":"SQL Arena"},"publisher":{"@type":"Organization","@id":"https://sql.coderang.dev/#organization","name":"SQL Arena","url":"https://sql.coderang.dev","logo":{"@type":"ImageObject","url":"https://sql.coderang.dev/android-chrome-192x192.png","width":192,"height":192},"sameAs":["https://t.me/coderang"],"description":"SQL Arena is an interactive SQL training platform — a practice arena, duels, a reference handbook and tutorials for analysts and backend developers."},"mainEntityOfPage":{"@type":"WebPage","@id":"https://sql.coderang.dev/en/blog/sql-initcap"},"inLanguage":"en-US","wordCount":480,"timeRequired":"PT2M","articleSection":"sql"}
{"@context":"https://schema.org","@type":"BreadcrumbList","inLanguage":"en-US","itemListElement":[{"@type":"ListItem","position":1,"name":"SQL Arena","item":"https://sql.coderang.dev/en"},{"@type":"ListItem","position":2,"name":"Blog","item":"https://sql.coderang.dev/en/blog"},{"@type":"ListItem","position":3,"name":"INITCAP in PostgreSQL: Title-Casing Strings the Right Way","item":"https://sql.coderang.dev/en/blog/sql-initcap"}]}
{"@context":"https://schema.org","@type":"FAQPage","inLanguage":"en-US","mainEntity":[{"@type":"Question","name":"What INITCAP does","acceptedAnswer":{"@type":"Answer","text":"INITCAP takes a string, splits it into words, and for each word raises the first letter to upper case while forcing every other letter to lower case. A word is any run of alphanumeric characters; a word boundary is any non-alphanumeric character (space, period, hyphen, apostrophe, and so on). Note that the original interior casing is not preserved. INITCAP always normalizes each word to \"first letter up, the rest down\", so 'McDONALD' becomes 'Mcdonald'."}},{"@type":"Question","name":"Where INITCAP breaks","acceptedAnswer":{"@type":"Answer","text":"The big trap is that INITCAP treats every non-alphanumeric character as a word boundary. For real names that is often wrong: - an apostrophe starts a \"new word\", so the letter after it gets capitalized; - hyphens and apostrophes inside a name are all treated as separators; - interior capitals (as in McDonald) are lost — they get folded down to lower case. Gotcha: INITCAP does not know cultural rules like McDonald, van der Berg, or DeShawn. It always capitalizes after an apostrophe or hyphen, and it drops interior capitals inside a word. For brands and surnames with special spelling, do not rely on INITCAP — store the canonical form separately. The second subtlety is locale and Unicode. Postg"}}]}
| theme-color | #0a0a0a |
| application-name | SQL Arena |
| author | SQL Arena |
| creator | SQL Arena |
| publisher | SQL Arena |
| googlebot | index, follow, max-image-preview:large, max-snippet:-1 |
| google-site-verification | EaorZzgqTO4qTFsEEiRorcvcDZOqzyHpTwUJwsCjq_Q |
| og:site_name | SQL Arena |
| og:locale | en_US |
| og:image | https://sql.coderang.dev/og?lang=en&title=INITCAP in PostgreSQL: Title-Casing Strings the Right Way |
| og:image:width | 1200 |
| og:image:height | 630 |
| og:image:alt | INITCAP in PostgreSQL: Title-Casing Strings the Right Way |
| og:image:type | image/png |
| og:type | article |
| article:published_time | 2026-06-19T02:55:51.993Z |
| article:modified_time | 2026-06-19T11:28:22.000Z |
| article:tag | mysql |
| twitter:card | summary_large_image |
| twitter:image | https://sql.coderang.dev/og?lang=en&title=INITCAP in PostgreSQL: Title-Casing Strings the Right Way |
| twitter:image:alt | INITCAP in PostgreSQL: Title-Casing Strings the Right Way |
Links:
| Server | nginx |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | s-maxage=300, stale-while-revalidate |
Viewport: width=device-width, initial-scale=1, maximum-scale=5, viewport-fit=cover
Robots: index, follow