The following example uses the SUBSTRING() function to extract the first 7 characters from the string.
SELECT SUBSTRING('OxlaDocumentation', 1, 7);
It will display the substring from position 6 output as shown below:
substring ----------- OxlaDoc
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Oxla Developer Hub","colors":{"primary":"#EEEEEE","light":"#EEEEEE","dark":"#232628"},"logo":{"light":"https://mintcdn.com/oxla/0Js4fLL2Ovp7KANj/assets/images/logo/logo-light.svg?fit=max\u0026auto=format\u0026n=0Js4fLL2Ovp7KANj\u0026q=85\u0026s=4074307a3716643bc058dc994a8cf42f","dark":"https://mintcdn.com/oxla/0Js4fLL2Ovp7KANj/assets/images/logo/logo-dark.svg?fit=max\u0026auto=format\u0026n=0Js4fLL2Ovp7KANj\u0026q=85\u0026s=1dfc90f7bfc27796145623a3c3bc8fa9","href":"https://docs.oxla.com/welcome"},"favicon":"/assets/images/favicon/oxla-favicon.svg","background":{"image":{"light":"https://mintlify.s3.us-west-1.amazonaws.com/oxla/assets/images/light/background/background-light.png","dark":"https://mintlify.s3.us-west-1.amazonaws.com/oxla/assets/images/dark/background/background-dark.png"}},"navbar":{"links":[{"label":"Oxla.com","href":"https://www.oxla.com/"},{"label":"Docker Hub","href":"https://hub.docker.com/r/oxla/oxla"},{"label":"Blog","href":"https://www.oxla.com/blog"}]},"footer":{"socials":{}},"seo":{"metatags":{"og:image":"https://mintlify.s3-us-west-1.amazonaws.com/oxla/assets/images/light/homepage-img-light.png"},"indexing":"navigable"},"banner":{"content":"Oxla has been acquired by Redpanda Data. [ Read the news here.](https://www.redpanda.com/blog/agentic-data-plane-adp)"},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"oxla","hasAudioNarration":false,"actualSubdomain":"oxla","customDomains":["docs.oxla.com"],"gitSource":{"type":"github","owner":"oxlacom","repo":"oxla-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6ae91f38d9cf549fcc2932be:success","clientVersion":"0.0.4111","searchFilterCounts":[{"language":"default","tag":"Development Guide","count":226},{"language":"default","tag":"SQL Reference","count":200},{"language":"default","tag":"SQL Functions","count":133},{"language":"default","tag":"Aggregate","count":33},{"language":"default","tag":"SQL Statements","count":28},{"language":"default","tag":"Other","count":22},{"language":"default","tag":"Statistics","count":19},{"language":"default","tag":"Math","count":19},{"language":"default","tag":"Window","count":19},{"language":"default","tag":"SQL Clauses","count":18}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"@tailwind base;@tailwind components;@tailwind utilities;@import url(\"https://fonts.googleapis.com/css2?family=Funnel+Display:wght@300..800\u0026display=swap\");body{font-family:\"Funnel Display\";font-optical-sizing:auto;font-style:normal}.dark p{color:rgb(255, 255, 255)}:is(.dark .dark\\:bg-codeblock\\/50){filter:brightness()}:is(.dark .dark\\:bg-codeblock\\/50) svg{filter:brightness(10)}:is(.dark .dark\\:bg-codeblock\\/50):hover{filter:brightness(10)}:is(.dark\\:text-primary-light){color:#694AFE}:is(.dark .dark\\:text-primary-light){color:#694AFE}.prose:is(.dark *){color:white}.prose{color:black}:not(pre)>code:is(.dark *){background:#3C4043;border-width:0}:not(pre)>code{background:#CCCCCC;color:black;border-width:0}.prose a{color:#FF4C4C;text-decoration:none;border-bottom:1px solid #FF4C4C;transition:color 0.3s, border-bottom-width 0.1s, font-weight 0.1s}:is(.dark) .prose a{color:#FF4C4C;text-decoration:none;border-bottom:1px solid #FF4C4C;transition:color 0.3s, border-bottom-width 0.1s, font-weight 0.1s}.prose a:hover,.prose a:focus{color:#FF4C4C;border-bottom-width:2px;font-weight:900;outline:none}:is(.dark) .prose a:hover,:is(.dark) .prose a:focus{color:#FF4C4C;border-bottom-width:2px;font-weight:900;outline:none}.prose a:visited{color:#FF4C4C}:is(.dark) .prose a:visited{color:#FF4C4C}.card{background-color:#FAFAFA;border:2px solid #232628;box-shadow:0 4px 8px rgb(0, 0, 0, 0.2);border-radius:8px;padding:5px;transition:0.3s}:is(.dark) .card{background-color:#232628;border:2px solid #606263;box-shadow:0 4px 8px rgb(0, 0, 0, 0.2);border-radius:8px;padding:5px;transition:0.3s}"}],"page":{"pagePath":"sql-reference/sql-functions/string-functions/substring","slug":"/sql-reference/sql-functions/string-functions/substring","pageMetadata":{"title":"SUBSTRING","createdAt":"2022-09-12T06:41:27.000Z","updatedAt":"2023-10-09T13:02:32.129Z","description":null,"href":"/sql-reference/sql-functions/string-functions/substring"},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,..._provideComponents(),...props.components},{CodeBlock,Heading,Tip,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(Warning,{children:[`SUBSTR is an alias for SUBSTRING. Learn more at `,_jsx(_components.a,{href:`/sql-reference/sql-functions/string-functions/substr`,children:`SUBSTR`}),` documentation.`]}),`\n`,_jsx(Heading,{level:`2`,id:`overview`,children:`Overview`}),`\n`,_jsx(_components.p,{children:`The SUBSTRING() function lets you extract a part of a string\\xA0and return that substring.`}),`\n`,_jsx(Heading,{level:`2`,id:`syntax`,children:`Syntax`}),`\n`,_jsxs(_components.p,{children:[`Here are the 2 basic syntaxes of the `,_jsx(_components.code,{children:`SUBSTRING()`}),` function in Oxla:`]}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`2 Arguments`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`sql`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`SUBSTRING`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`( string, start_position )`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`3 Arguments`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`sql`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`SUBSTRING`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(string, start_position, `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`length`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})}),`\n`,_jsxs(Tip,{children:[`Both syntaxes will have input and return of type `,_jsx(_components.code,{children:`string`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`example`,children:`Example`}),`\n`,_jsxs(_components.p,{children:[`The following example uses the `,_jsx(_components.code,{children:`SUBSTRING()`}),` function to extract the first 7 characters from the string.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`sql`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`SELECT`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` SUBSTRING`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'OxlaDocumentation'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`7`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`It will display the substring from position 6 output as shown below:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`sql`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`substring `})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`-----------`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` OxlaDoc`})}),`\n`]})})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"SUBSTRING","createdAt":"2022-09-12T06:41:27.000Z","updatedAt":"2023-10-09T13:02:32.129Z","description":null,"href":"/sql-reference/sql-functions/string-functions/substring"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Overview","slug":"overview","depth":2,"children":[]},{"title":"Syntax","slug":"syntax","depth":2,"children":[]},{"title":"Example","slug":"example","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"oxla","siteName":"Oxla Developer Hub","title":"SUBSTRING - Oxla Developer Hub","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2025-10-28T08:12:53.121Z","originalFileLocation":"sql-reference/sql-functions/string-functions/substring.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"application-name\" content=\"Oxla Developer Hub\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/oxla/NKLUScSyRMjD1PxQ/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/oxla/NKLUScSyRMjD1PxQ/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/oxla/NKLUScSyRMjD1PxQ/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/oxla/NKLUScSyRMjD1PxQ/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/oxla/NKLUScSyRMjD1PxQ/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/oxla/NKLUScSyRMjD1PxQ/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/oxla/NKLUScSyRMjD1PxQ/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/oxla/NKLUScSyRMjD1PxQ/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/oxla/NKLUScSyRMjD1PxQ/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"SUBSTRING - Oxla Developer Hub\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Oxla Developer Hub\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.oxla.com/sql-reference/sql-functions/string-functions/substring\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://mintlify.s3-us-west-1.amazonaws.com/oxla/assets/images/light/homepage-img-light.png\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"SUBSTRING - Oxla Developer Hub\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://mintlify.s3-us-west-1.amazonaws.com/oxla/assets/images/light/homepage-img-light.png\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/oxla/NKLUScSyRMjD1PxQ/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Oxla Developer Hub\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#EEEEEE\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.oxla.com/sql-reference/sql-functions/string-functions/substring\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/sql-reference/sql-functions/string-functions/substring.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.oxla.com/#organization\",\"name\":\"Oxla Developer Hub\",\"url\":\"https://docs.oxla.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/oxla/0Js4fLL2Ovp7KANj/assets/images/logo/logo-light.svg?fit=max\u0026auto=format\u0026n=0Js4fLL2Ovp7KANj\u0026q=85\u0026s=4074307a3716643bc058dc994a8cf42f\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.oxla.com#website\",\"name\":\"Oxla Developer Hub\",\"url\":\"https://docs.oxla.com\",\"publisher\":{\"@id\":\"https://docs.oxla.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.oxla.com/sql-reference/sql-functions/string-functions/substring#webpage\",\"url\":\"https://docs.oxla.com/sql-reference/sql-functions/string-functions/substring\",\"name\":\"SUBSTRING\",\"dateModified\":\"2025-10-28T08:12:53.121Z\",\"isPartOf\":{\"@id\":\"https://docs.oxla.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.oxla.com/sql-reference/sql-functions/string-functions/substring#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.oxla.com/sql-reference/sql-functions/string-functions/substring#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Development Guide\",\"item\":\"https://docs.oxla.com/sql-reference/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SQL Reference\",\"item\":\"https://docs.oxla.com/sql-reference/overview\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"SQL Functions\",\"item\":\"https://docs.oxla.com/sql-reference/sql-functions/overview\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"String\",\"item\":\"https://docs.oxla.com/sql-reference/sql-functions/string-functions/overview\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"SUBSTRING\",\"item\":\"https://docs.oxla.com/sql-reference/sql-functions/string-functions/substring\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.oxla.com/sql-reference/sql-functions/string-functions/substring#article\",\"headline\":\"SUBSTRING\",\"name\":\"SUBSTRING\",\"url\":\"https://docs.oxla.com/sql-reference/sql-functions/string-functions/substring\",\"mainEntityOfPage\":{\"@id\":\"https://docs.oxla.com/sql-reference/sql-functions/string-functions/substring#webpage\"},\"image\":\"https://mintlify.s3-us-west-1.amazonaws.com/oxla/assets/images/light/homepage-img-light.png\",\"dateModified\":\"2025-10-28T08:12:53.121Z\",\"publisher\":{\"@id\":\"https://docs.oxla.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.oxla.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Oxla Developer Hub\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Oxla Developer Hub\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/sql-reference/sql-functions/string-functions/substring.md","siteName":"Oxla Developer Hub","nav":{"global":null,"groups":[{"group":"Home","pages":[{"title":"Welcome","href":"/welcome"}]},{"group":"Introduction","pages":[{"title":"What is Oxla and why use it","href":"/introduction/what-is-oxla-and-why-use-it"}]},{"group":"Development Guide","pages":[{"group":"SQL Reference","pages":[{"title":"SQL Reference","sidebarTitle":"Overview","href":"/sql-reference/overview"},{"group":"SQL Statements","pages":[{"title":"SQL STATEMENTS","sidebarTitle":"Overview","href":"/sql-reference/sql-statements/overview"},{"title":"SELECT","href":"/sql-reference/sql-statements/select"},{"title":"INSERT INTO","href":"/sql-reference/sql-statements/insert-into"},{"group":"COPY FROM","pages":[{"title":"COPY FROM","href":"/sql-reference/sql-statements/copy-from/copy-from"},{"title":"COPY FROM with Delimiter","href":"/sql-reference/sql-statements/copy-from/copy-from-with-delimiter"},{"title":"COPY FROM with Endpoint","href":"/sql-reference/sql-statements/copy-from/copy-from-with-endpoint"},{"title":"COPY FROM with HEADER","href":"/sql-reference/sql-statements/copy-from/copy-from-with-header"},{"title":"COPY FROM with NULL","href":"/sql-reference/sql-statements/copy-from/copy-from-with-null"},{"title":"COPY FROM with FORMAT","href":"/sql-reference/sql-statements/copy-from/copy-from-with-format"},{"title":"Importing Data from a CSV file","sidebarTitle":"COPY FROM CSV","href":"/sql-reference/sql-statements/copy-from/copy-from-csv"},{"title":"Importing Data from a ORC file","sidebarTitle":"COPY FROM ORC","href":"/sql-reference/sql-statements/copy-from/copy-from-orc"},{"title":"Importing Data from a Parquet file","sidebarTitle":"COPY FROM PARQUET","href":"/sql-reference/sql-statements/copy-from/copy-from-parquet"},{"title":"COPY FROM STDIN","href":"/sql-reference/sql-statements/copy-from/copy-from-stdin"}]},{"group":"COPY TO","pages":[{"title":"COPY TO","href":"/sql-reference/sql-statements/copy-to/copy-to"},{"title":"Export Data to a CSV file","sidebarTitle":"COPY TO CSV","href":"/sql-reference/sql-statements/copy-to/copy-to-csv"},{"title":"COPY TO with Delimiter","href":"/sql-reference/sql-statements/copy-to/copy-to-with-delimiter"},{"title":"COPY TO with Endpoint","href":"/sql-reference/sql-statements/copy-to/copy-to-with-endpoint"},{"title":"COPY TO with HEADER","href":"/sql-reference/sql-statements/copy-to/copy-to-with-header"},{"title":"COPY TO with NULL","href":"/sql-reference/sql-statements/copy-to/copy-to-with-null"},{"title":"COPY TO STDOUT","href":"/sql-reference/sql-statements/copy-to/copy-to-stdout"}]},{"title":"CREATE INDEX","href":"/sql-reference/sql-statements/create-index"},{"title":"CREATE TABLE","href":"/sql-reference/sql-statements/create-table"},{"title":"DESCRIBE","href":"/sql-reference/sql-statements/describe"},{"title":"DROP","href":"/sql-reference/sql-statements/drop"},{"title":"SET/SHOW","href":"/sql-reference/sql-statements/set-show"},{"title":"SHOW TABLES","href":"/sql-reference/sql-statements/show-tables"},{"title":"SHOW NODES","href":"/sql-reference/sql-statements/show-nodes"},{"title":"Keywords","href":"/sql-reference/sql-statements/keywords"}]},{"group":"SQL Mutations","pages":[{"title":"SQL MUTATIONS","sidebarTitle":"Overview","href":"/sql-reference/sql-mutations/overview"},{"title":"UPDATE","href":"/sql-reference/sql-mutations/update"},{"title":"DELETE","href":"/sql-reference/sql-mutations/delete"}]},{"group":"SQL Clauses","pages":[{"title":"SQL CLAUSES","sidebarTitle":"Overview","href":"/sql-reference/sql-clauses/overview"},{"group":"FROM","pages":[{"title":"FROM","href":"/sql-reference/sql-clauses/from/from"},{"title":"JOIN","href":"/sql-reference/sql-clauses/from/join"},{"title":"LEFT JOIN","href":"/sql-reference/sql-clauses/from/left-join"},{"title":"OUTER JOIN","href":"/sql-reference/sql-clauses/from/outer-join"},{"title":"RIGHT JOIN","href":"/sql-reference/sql-clauses/from/right-join"}]},{"title":"WHERE","href":"/sql-reference/sql-clauses/where"},{"title":"GROUP BY","href":"/sql-reference/sql-clauses/group-by"},{"title":"HAVING","href":"/sql-reference/sql-clauses/having"},{"title":"ORDER BY","href":"/sql-reference/sql-clauses/order-by"},{"title":"LIMIT","href":"/sql-reference/sql-clauses/limit"},{"title":"OFFSET","href":"/sql-reference/sql-clauses/offset"},{"group":"Set Operations","pages":[{"title":"Overview","href":"/sql-reference/sql-clauses/set-operations/overview"},{"title":"EXCEPT","href":"/sql-reference/sql-clauses/set-operations/except"},{"title":"INTERSECT","href":"/sql-reference/sql-clauses/set-operations/intersect"},{"title":"UNION","href":"/sql-reference/sql-clauses/set-operations/union"}]},{"title":"WITH","href":"/sql-reference/sql-clauses/with"},{"title":"OVER / WINDOW","href":"/sql-reference/sql-clauses/over-window"}]},{"group":"SQL Data Types","pages":[{"title":"SQL DATA TYPES","sidebarTitle":"Overview","href":"/sql-reference/sql-data-types/overview"},{"title":"Data Type Operators","href":"/sql-reference/sql-data-types/data-type-operators"},{"group":"Numeric","pages":[{"title":"Numeric","href":"/sql-reference/sql-data-types/numeric-type/numeric"},{"title":"Numeric Data Type - Aliases","href":"/sql-reference/sql-data-types/numeric-type/numeric-data-type-aliases"}]},{"title":"Timestamp Without Time Zone","href":"/sql-reference/sql-data-types/timestamp-without-time-zone"},{"title":"Timestamp with Time Zone","href":"/sql-reference/sql-data-types/timestamp-with-time-zone"},{"title":"Date","href":"/sql-reference/sql-data-types/date"},{"group":"Time","pages":[{"title":"Time","href":"/sql-reference/sql-data-types/time-type/time"},{"title":"Time Operators","href":"/sql-reference/sql-data-types/time-type/time-operators"}]},{"title":"Interval","href":"/sql-reference/sql-data-types/interval"},{"title":"Bool","href":"/sql-reference/sql-data-types/bool"},{"title":"Text","href":"/sql-reference/sql-data-types/text"},{"title":"JSON","href":"/sql-reference/sql-data-types/json"},{"title":"Array","href":"/sql-reference/sql-data-types/array"}]},{"group":"SQL Functions","pages":[{"title":"SQL Functions","sidebarTitle":"Overview","href":"/sql-reference/sql-functions/overview"},{"group":"Boolean","pages":[{"title":"IF Function","href":"/sql-reference/sql-functions/boolean-functions/if-function"},{"title":"IS DISTINCT FROM Operator","href":"/sql-reference/sql-functions/boolean-functions/is-distinct-from-operator"},{"title":"IS NOT DISTINCT FROM Operator","href":"/sql-reference/sql-functions/boolean-functions/is-not-distinct-from-operator"}]},{"group":"Math","pages":[{"title":"Overview","href":"/sql-reference/sql-functions/math-functions/overview"},{"title":"ABS","href":"/sql-reference/sql-functions/math-functions/abs"},{"title":"CBRT","href":"/sql-reference/sql-functions/math-functions/cbrt"},{"title":"CEIL","href":"/sql-reference/sql-functions/math-functions/ceil"},{"title":"EXP","href":"/sql-reference/sql-functions/math-functions/exp"},{"title":"FLOOR","href":"/sql-reference/sql-functions/math-functions/floor"},{"title":"GREATEST","href":"/sql-reference/sql-functions/math-functions/greatest"},{"title":"LEAST","href":"/sql-reference/sql-functions/math-functions/least"},{"title":"LN","href":"/sql-reference/sql-functions/math-functions/ln"},{"title":"LOG","href":"/sql-reference/sql-functions/math-functions/log"},{"title":"POWER","href":"/sql-reference/sql-functions/math-functions/power"},{"title":"RANDOM","href":"/sql-reference/sql-functions/math-functions/random"},{"title":"ROUND","href":"/sql-reference/sql-functions/math-functions/round"},{"title":"SIGN","href":"/sql-reference/sql-functions/math-functions/sign"},{"title":"SIN","href":"/sql-reference/sql-functions/math-functions/sin"},{"title":"SQRT","href":"/sql-reference/sql-functions/math-functions/sqrt"},{"title":"BITWISE SHIFT LEFT","sidebarTitle":"BITWISE SHIFT LEFT","href":"/sql-reference/sql-functions/math-functions/bitwise-shift-left"},{"title":"BITWISE SHIFT RIGHT","sidebarTitle":"BITWISE SHIFT RIGHT","href":"/sql-reference/sql-functions/math-functions/bitwise-shift-right"},{"title":"TO_CHAR from Number","href":"/sql-reference/sql-functions/math-functions/to-char-from-number"}]},{"group":"String","pages":[{"title":"Overview","href":"/sql-reference/sql-functions/string-functions/overview"},{"title":"CONCAT","href":"/sql-reference/sql-functions/string-functions/concat"},{"title":"ENDS_WITH","href":"/sql-reference/sql-functions/string-functions/ends-with"},{"title":"LENGTH","href":"/sql-reference/sql-functions/string-functions/length"},{"title":"LOWER","href":"/sql-reference/sql-functions/string-functions/lower"},{"group":"Regex","pages":[{"title":"REGEXP_REPLACE()","sidebarTitle":"REGEXP_REPLACE","href":"/sql-reference/sql-functions/string-functions/regex/regexp-replace"},{"title":"REGEXP_MATCH()","sidebarTitle":"REGEXP_MATCH","href":"/sql-reference/sql-functions/string-functions/regex/regexp-match"},{"title":"POSIX Regular Expressions","href":"/sql-reference/sql-functions/string-functions/regex/posix-regular-expressions"}]},{"title":"REPLACE()","sidebarTitle":"REPLACE","href":"/sql-reference/sql-functions/string-functions/replace"},{"title":"STARTS_WITH","href":"/sql-reference/sql-functions/string-functions/starts-with"},{"title":"STRPOS","href":"/sql-reference/sql-functions/string-functions/strpos"},{"title":"SUBSTR","description":null,"href":"/sql-reference/sql-functions/string-functions/substr"},{"title":"SUBSTRING","href":"/sql-reference/sql-functions/string-functions/substring"},{"title":"UPPER","description":null,"href":"/sql-reference/sql-functions/string-functions/upper"},{"title":"POSITION","href":"/sql-reference/sql-functions/string-functions/position"}]},{"group":"Timestamp","pages":[{"title":"Overview","href":"/sql-reference/sql-functions/timestamp-functions/overview"},{"title":"CURRENT_TIMESTAMP","href":"/sql-reference/sql-functions/timestamp-functions/current-timestamp"},{"title":"DATE_TRUNC","href":"/sql-reference/sql-functions/timestamp-functions/date-trunc"},{"title":"EXTRACT","href":"/sql-reference/sql-functions/timestamp-functions/extract"},{"title":"FORMAT_TIMESTAMP","href":"/sql-reference/sql-functions/timestamp-functions/format-timestamp"},{"title":"TIMESTAMP_MICROS","href":"/sql-reference/sql-functions/timestamp-functions/timestamp-micros"},{"title":"TIMESTAMP_MILLIS","href":"/sql-reference/sql-functions/timestamp-functions/timestamp-millis"},{"title":"TIMESTAMP_SECONDS","href":"/sql-reference/sql-functions/timestamp-functions/timestamp-seconds"},{"title":"TIMESTAMP_TRUNC","href":"/sql-reference/sql-functions/timestamp-functions/timestamp-trunc"},{"title":"TO_CHAR","href":"/sql-reference/sql-functions/timestamp-functions/to-char"},{"title":"TO_TIMESTAMP","href":"/sql-reference/sql-functions/timestamp-functions/to-timestamp"},{"title":"UNIX_MICROS","href":"/sql-reference/sql-functions/timestamp-functions/unix-macros"},{"title":"UNIX_MICROS","href":"/sql-reference/sql-functions/timestamp-functions/unix-micros"},{"title":"UNIX_MILLIS","href":"/sql-reference/sql-functions/timestamp-functions/unix-millis"},{"title":"UNIX_SECONDS","href":"/sql-reference/sql-functions/timestamp-functions/unix-seconds"}]},{"group":"Trigonometric","pages":[{"title":"Trigonometric Functions","href":"/sql-reference/sql-functions/trigonometric-functions/overview"}]},{"group":"JSON","pages":[{"title":"Overview","href":"/sql-reference/sql-functions/json-functions/overview"},{"title":"JSON_ARRAY_EXTRACT","href":"/sql-reference/sql-functions/json-functions/json-array-extract"},{"title":"JSON_ARRAY_LENGTH","href":"/sql-reference/sql-functions/json-functions/json-array-length"},{"title":"JSON_EXTRACT_PATH","href":"/sql-reference/sql-functions/json-functions/json-extract-path"},{"title":"JSON_EXTRACT_PATH_TEXT","href":"/sql-reference/sql-functions/json-functions/json-extract-path-text"}]},{"group":"Aggregate","pages":[{"title":"Overview","href":"/sql-reference/sql-functions/aggregate-functions/overview"},{"group":"Statistics","pages":[{"title":"Overview","href":"/sql-reference/sql-functions/aggregate-functions/overview-statistics"},{"title":"CORR()","sidebarTitle":"CORR","href":"/sql-reference/sql-functions/aggregate-functions/corr"},{"title":"COVAR_POP()","sidebarTitle":"COVAR_POP","href":"/sql-reference/sql-functions/aggregate-functions/covar-pop"},{"title":"COVAR_SAMP","href":"/sql-reference/sql-functions/aggregate-functions/covar-samp"},{"title":"REGR_AVGX()","sidebarTitle":"REGR_AVGX","href":"/sql-reference/sql-functions/aggregate-functions/regr-avgx"},{"title":"REGR_AVGY()","sidebarTitle":"REGR_AVGY","href":"/sql-reference/sql-functions/aggregate-functions/regr-avgy"},{"title":"REGR_COUNT()","sidebarTitle":"REGR_COUNT","href":"/sql-reference/sql-functions/aggregate-functions/regr-count"},{"title":"REGR_INTERCEPT()","sidebarTitle":"REGR_INTERCEPT","href":"/sql-reference/sql-functions/aggregate-functions/regr-intercept"},{"title":"REGR_R2()","sidebarTitle":"REGR_R2","href":"/sql-reference/sql-functions/aggregate-functions/regr-r2"},{"title":"REGR_SLOPE()","sidebarTitle":"REGR_SLOPE","href":"/sql-reference/sql-functions/aggregate-functions/regr-slope"},{"title":"REGR_SXX()","sidebarTitle":"REGR_SXX","href":"/sql-reference/sql-functions/aggregate-functions/regr-sxx"},{"title":"REGR_SXY()","sidebarTitle":"REGR_SXY","href":"/sql-reference/sql-functions/aggregate-functions/regr-sxy"},{"title":"REGR_SYY()","sidebarTitle":"REGR_SYY","href":"/sql-reference/sql-functions/aggregate-functions/regr-syy"},{"title":"STDDEV()","sidebarTitle":"STDDEV","href":"/sql-reference/sql-functions/aggregate-functions/stddev"},{"title":"STDDEV_POP()","sidebarTitle":"STDDEV_POP","href":"/sql-reference/sql-functions/aggregate-functions/stddev-pop"},{"title":"STDDEV_SAMP()","sidebarTitle":"STDDEV_SAMP","href":"/sql-reference/sql-functions/aggregate-functions/stddev-samp"},{"title":"VARIANCE()","sidebarTitle":"VARIANCE","href":"/sql-reference/sql-functions/aggregate-functions/variance"},{"title":"VAR_POP()","sidebarTitle":"VAR_POP","href":"/sql-reference/sql-functions/aggregate-functions/var-pop"},{"title":"VAR_SAMP()","sidebarTitle":"VAR_SAMP","href":"/sql-reference/sql-functions/aggregate-functions/var-samp"}]},{"group":"Ordered-Set","pages":[{"title":"MODE()","sidebarTitle":"MODE","href":"/sql-reference/sql-functions/aggregate-functions/ordered-set-aggregate-functions/mode"},{"title":"PERCENTILE_CONT()","sidebarTitle":"PERCENTILE_CONT","href":"/sql-reference/sql-functions/aggregate-functions/ordered-set-aggregate-functions/percentile-cont"},{"title":"PERCENTILE_DISC()","sidebarTitle":"PERCENTILE_DISC","href":"/sql-reference/sql-functions/aggregate-functions/ordered-set-aggregate-functions/percentile-disc"}]},{"title":"AVG","href":"/sql-reference/sql-functions/aggregate-functions/avg"},{"title":"BOOL_AND","href":"/sql-reference/sql-functions/aggregate-functions/bool-and"},{"title":"BOOL_OR","href":"/sql-reference/sql-functions/aggregate-functions/bool-or"},{"title":"COUNT","href":"/sql-reference/sql-functions/aggregate-functions/count"},{"title":"FOR_MAX()","sidebarTitle":"FOR_MAX","href":"/sql-reference/sql-functions/aggregate-functions/for-max"},{"title":"FOR_MIN()","sidebarTitle":"FOR_MIN","href":"/sql-reference/sql-functions/aggregate-functions/for-min"},{"title":"MAX","href":"/sql-reference/sql-functions/aggregate-functions/max"},{"title":"MIN","href":"/sql-reference/sql-functions/aggregate-functions/min"},{"title":"SUM","href":"/sql-reference/sql-functions/aggregate-functions/sum"},{"title":"DISTINCT","href":"/sql-reference/sql-functions/aggregate-functions/distinct"}]},{"group":"Window","pages":[{"title":"Overview","href":"/sql-reference/sql-functions/window-functions/overview"},{"title":"COUNT()","sidebarTitle":"COUNT","href":"/sql-reference/sql-functions/window-functions/count"},{"title":"DENSE_RANK()","sidebarTitle":"DENSE_RANK","href":"/sql-reference/sql-functions/window-functions/dense-rank"},{"title":"RANK()","sidebarTitle":"RANK","href":"/sql-reference/sql-functions/window-functions/rank"},{"title":"ROW_NUMBER","href":"/sql-reference/sql-functions/window-functions/row-number"},{"title":"AVG()","sidebarTitle":"AVG","href":"/sql-reference/sql-functions/window-functions/avg"},{"title":"BOOL_AND()","sidebarTitle":"BOOL_AND","href":"/sql-reference/sql-functions/window-functions/bool-and"},{"title":"BOOL_OR()","sidebarTitle":"BOOL_OR","href":"/sql-reference/sql-functions/window-functions/bool-or"},{"title":"CUME_DIST()","sidebarTitle":"CUME_DIST","href":"/sql-reference/sql-functions/window-functions/cume-dist"},{"title":"FIRST_VALUE()","sidebarTitle":"FIRST_VALUE","href":"/sql-reference/sql-functions/window-functions/first-value"},{"title":"LAG()","sidebarTitle":"LAG","href":"/sql-reference/sql-functions/window-functions/lag"},{"title":"LAST_VALUE()","sidebarTitle":"LAST_VALUE","href":"/sql-reference/sql-functions/window-functions/last-value"},{"title":"LEAD()","sidebarTitle":"LEAD","href":"/sql-reference/sql-functions/window-functions/lead"},{"title":"MAX()","sidebarTitle":"MAX","href":"/sql-reference/sql-functions/window-functions/max"},{"title":"MIN()","sidebarTitle":"MIN","href":"/sql-reference/sql-functions/window-functions/min"},{"title":"NTH_VALUE()","sidebarTitle":"NTH_VALUE","href":"/sql-reference/sql-functions/window-functions/nth-value"},{"title":"NTILE()","sidebarTitle":"NTILE","href":"/sql-reference/sql-functions/window-functions/ntile"},{"title":"PERCENT_RANK()","sidebarTitle":"PERCENT_RANK","href":"/sql-reference/sql-functions/window-functions/percent-rank"},{"title":"SUM()","sidebarTitle":"SUM","href":"/sql-reference/sql-functions/window-functions/sum"}]},{"group":"String","pages":[{"group":"REGEX","pages":[{"title":"REGEXP_REPLACE()","sidebarTitle":"REGEXP_REPLACE","href":"/sql-reference/sql-functions/string-functions/regex/regexp-replace"},{"title":"REGEXP_MATCH()","sidebarTitle":"REGEXP_MATCH","href":"/sql-reference/sql-functions/string-functions/regex/regexp-match"},{"title":"POSIX Regular Expressions","href":"/sql-reference/sql-functions/string-functions/regex/posix-regular-expressions"}]},{"title":"Overview","href":"/sql-reference/sql-functions/string-functions/overview"},{"title":"CONCAT","href":"/sql-reference/sql-functions/string-functions/concat"},{"title":"ENDS_WITH","href":"/sql-reference/sql-functions/string-functions/ends-with"},{"title":"LENGTH","href":"/sql-reference/sql-functions/string-functions/length"},{"title":"LOWER","href":"/sql-reference/sql-functions/string-functions/lower"},{"title":"REPLACE()","sidebarTitle":"REPLACE","href":"/sql-reference/sql-functions/string-functions/replace"},{"title":"STARTS_WITH","href":"/sql-reference/sql-functions/string-functions/starts-with"},{"title":"STRPOS","href":"/sql-reference/sql-functions/string-functions/strpos"},{"title":"SUBSTR","description":null,"href":"/sql-reference/sql-functions/string-functions/substr"},{"title":"SUBSTRING","href":"/sql-reference/sql-functions/string-functions/substring"},{"title":"UPPER","description":null,"href":"/sql-reference/sql-functions/string-functions/upper"},{"title":"POSITION","href":"/sql-reference/sql-functions/string-functions/position"}]},{"group":"Timestamp","pages":[{"title":"Overview","href":"/sql-reference/sql-functions/timestamp-functions/overview"},{"title":"CURRENT_TIMESTAMP","href":"/sql-reference/sql-functions/timestamp-functions/current-timestamp"},{"title":"DATE_TRUNC","href":"/sql-reference/sql-functions/timestamp-functions/date-trunc"},{"title":"EXTRACT","href":"/sql-reference/sql-functions/timestamp-functions/extract"},{"title":"FORMAT_TIMESTAMP","href":"/sql-reference/sql-functions/timestamp-functions/format-timestamp"},{"title":"TIMESTAMP_MICROS","href":"/sql-reference/sql-functions/timestamp-functions/timestamp-micros"},{"title":"TIMESTAMP_MILLIS","href":"/sql-reference/sql-functions/timestamp-functions/timestamp-millis"},{"title":"TIMESTAMP_SECONDS","href":"/sql-reference/sql-functions/timestamp-functions/timestamp-seconds"},{"title":"TIMESTAMP_TRUNC","href":"/sql-reference/sql-functions/timestamp-functions/timestamp-trunc"},{"title":"TO_CHAR","href":"/sql-reference/sql-functions/timestamp-functions/to-char"},{"title":"TO_TIMESTAMP","href":"/sql-reference/sql-functions/timestamp-functions/to-timestamp"},{"title":"UNIX_MICROS","href":"/sql-reference/sql-functions/timestamp-functions/unix-macros"},{"title":"UNIX_MICROS","href":"/sql-reference/sql-functions/timestamp-functions/unix-micros"},{"title":"UNIX_MILLIS","href":"/sql-reference/sql-functions/timestamp-functions/unix-millis"},{"title":"UNIX_SECONDS","href":"/sql-reference/sql-functions/timestamp-functions/unix-seconds"}]},{"group":"Boolean","pages":[{"title":"IF Function","href":"/sql-reference/sql-functions/boolean-functions/if-function"},{"title":"IS DISTINCT FROM Operator","href":"/sql-reference/sql-functions/boolean-functions/is-distinct-from-operator"},{"title":"IS NOT DISTINCT FROM Operator","href":"/sql-reference/sql-functions/boolean-functions/is-not-distinct-from-operator"}]},{"group":"JSON","pages":[{"title":"Overview","href":"/sql-reference/sql-functions/json-functions/overview"},{"title":"JSON_ARRAY_EXTRACT","href":"/sql-reference/sql-functions/json-functions/json-array-extract"},{"title":"JSON_ARRAY_LENGTH","href":"/sql-reference/sql-functions/json-functions/json-array-length"},{"title":"JSON_EXTRACT_PATH","href":"/sql-reference/sql-functions/json-functions/json-extract-path"},{"title":"JSON_EXTRACT_PATH_TEXT","href":"/sql-reference/sql-functions/json-functions/json-extract-path-text"}]},{"group":"Other","pages":[{"title":"Overview","href":"/sql-reference/sql-functions/other-functions/overview"},{"title":"coalesce()","sidebarTitle":"coalesce","href":"/sql-reference/sql-functions/other-functions/coalesce"},{"title":"current_database()","sidebarTitle":"current_database","href":"/sql-reference/sql-functions/other-functions/current-database"},{"title":"current_schema()","sidebarTitle":"current_schema","href":"/sql-reference/sql-functions/other-functions/current-schema"},{"title":"has_schema_privilege()","sidebarTitle":"has_schema_privilege","href":"/sql-reference/sql-functions/other-functions/has-schema-privillege"},{"title":"nullif()","sidebarTitle":"nullif","href":"/sql-reference/sql-functions/other-functions/nullif"},{"title":"pg_get_expr()","sidebarTitle":"pg_get_expr","href":"/sql-reference/sql-functions/other-functions/pg-get-expr"},{"title":"pg_total_relation_size()","sidebarTitle":"pg_total_relation_size","href":"/sql-reference/sql-functions/other-functions/pg-total-relation-size"},{"title":"pg_typeof()","sidebarTitle":"pg_typeof","href":"/sql-reference/sql-functions/other-functions/pg-typeof"},{"title":"col_description()","sidebarTitle":"col_description","href":"/sql-reference/sql-functions/other-functions/col-description"},{"title":"pg_get_constraintdef()","sidebarTitle":"pg_get_constraintdef","href":"/sql-reference/sql-functions/other-functions/pg-get-constraintdef"},{"title":"pg_table_is_visible()","sidebarTitle":"pg_table_is_visible","href":"/sql-reference/sql-functions/other-functions/pg-table-is-visible"},{"title":"pg_size_pretty()","sidebarTitle":"pg_size_pretty","href":"/sql-reference/sql-functions/other-functions/pg-size-pretty"},{"title":"obj_description()","sidebarTitle":"obj_description","href":"/sql-reference/sql-functions/other-functions/obj-description"},{"title":"pg_table_size()","sidebarTitle":"pg_table_size","href":"/sql-reference/sql-functions/other-functions/pg-table-size"},{"title":"pg_get_indexdef()","sidebarTitle":"pg_get_indexdef","href":"/sql-reference/sql-functions/other-functions/pg-get-indexdef"},{"title":"shobj_description()","sidebarTitle":"shobj_description","href":"/sql-reference/sql-functions/other-functions/shobj-description"},{"title":"pg_backend_pid()","sidebarTitle":"pg_backend_pid","href":"/sql-reference/sql-functions/other-functions/pg-backend-pid"},{"title":"pg_encoding_to_char()","sidebarTitle":"pg_encoding_to_char","href":"/sql-reference/sql-functions/other-functions/pg-encoding-to-char"},{"title":"pg_relation_is_publishable()","sidebarTitle":"pg_relation_is_publishable","href":"/sql-reference/sql-functions/other-functions/pg-relation-is-publishable"},{"title":"pg_get_userbyid()","sidebarTitle":"pg_get_userbyid","href":"/sql-reference/sql-functions/other-functions/pg-get-userbyid"},{"title":"pg_get_statisticsobjdef_columns()","sidebarTitle":"pg_get_statisticsobjdef_columns","href":"/sql-reference/sql-functions/other-functions/pg-get-statisticsobjdef-columns"}]},{"group":"Trigonometric","pages":[{"title":"Trigonometric Functions","href":"/sql-reference/sql-functions/trigonometric-functions/overview"}]}]},{"title":"Schema Definition","href":"/sql-reference/schema"},{"title":"Comment Support","href":"/sql-reference/comment-support"},{"title":"Transactions","href":"/sql-reference/transactions"}]},{"group":"Clients \u0026 Tools","pages":[{"group":"Language Clients","pages":[{"title":"C# (Dapper - Npgsql)","href":"/clients-tools/language-clients/dotnet-dapper"},{"title":"Java (JDBC)","href":"/clients-tools/language-clients/java-jdbc"},{"title":"PHP (PDO)","href":"/clients-tools/language-clients/php-pdo"},{"title":"Psycopg2","href":"/clients-tools/language-clients/psycopg2"}]}]},{"group":"Security","pages":[{"title":"Access Control","sidebarTitle":"Access Control","href":"/security/access-control"},{"title":"Roles","href":"/security/roles"},{"title":"Ownership","href":"/security/ownership"},{"title":"Privileges","href":"/security/privileges"},{"title":"Permission Rules for Operations","href":"/security/operation-permission-rules"},{"title":"SSL Configuration","href":"/security/ssl-configuration"}]},{"group":"System Catalogs","pages":[{"title":"Overview","href":"/system-catalogs/overview"},{"title":"Oxla Home Files","href":"/system-catalogs/oxla_home_files"},{"title":"Data Task Stability","href":"/system-catalogs/data_task_stability"},{"group":"Catalogs","pages":[{"title":"pg_description","href":"/system-catalogs/catalogs/pg_description"},{"title":"pg_settings","href":"/system-catalogs/catalogs/pg_settings"},{"title":"pg_index","href":"/system-catalogs/catalogs/pg_index"},{"title":"pg_namespace","href":"/system-catalogs/catalogs/pg_namespace"},{"title":"pg_attrdef","href":"/system-catalogs/catalogs/pg_attrdef"},{"title":"pg_depend","href":"/system-catalogs/catalogs/pg_depend"},{"title":"pg_constraint","href":"/system-catalogs/catalogs/pg_constraint"},{"title":"pg_statio_user_tables","href":"/system-catalogs/catalogs/pg_statio_user_tables"},{"title":"pg_type","href":"/system-catalogs/catalogs/pg_type"},{"title":"pg_attribute","href":"/system-catalogs/catalogs/pg_attribute"},{"title":"pg_class","href":"/system-catalogs/catalogs/pg_class"}]}]},{"group":"Troubleshooting \u0026 Optimization","pages":[{"title":"Error Handling","href":"/troubleshooting-optimization/error-handling"},{"title":"Degraded State Handling","href":"/troubleshooting-optimization/degraded-state-handling"}]}]},{"group":"Resources","pages":[{"title":"OLTP vs. OLAP","href":"/resources/oltp-vs-olap"},{"title":"Oxla vs. PostgreSQL","href":"/resources/oxla-vs-postgresql"}]}]},"basePath":"","title":"SUBSTRING - Oxla Developer Hub","buildId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","deploymentId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","dynamics":["10e4515597"],"chunks":["BannerMarkdown-DV3Oq1fY.js","dist-C-XZBk9h.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","clsx-D3Isdib3.js","html-void-elements-mCSPHezU.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js"]}