{"id":109450,"date":"2026-04-15T13:00:00","date_gmt":"2026-04-15T13:00:00","guid":{"rendered":"https:\/\/www.red-gate.com\/simple-talk\/?p=109450"},"modified":"2026-04-08T13:01:20","modified_gmt":"2026-04-08T13:01:20","slug":"can-sql-server-2025s-regexp_split_to_table-fix-string_split-in-t-sql","status":"publish","type":"post","link":"https:\/\/www.red-gate.com\/simple-talk\/databases\/sql-server\/can-sql-server-2025s-regexp_split_to_table-fix-string_split-in-t-sql\/","title":{"rendered":"Can SQL Server 2025&#8217;s REGEXP_SPLIT_TO_TABLE fix STRING_SPLIT in T-SQL?\u00a0"},"content":{"rendered":"\n<p><strong>String splitting in T-SQL has historically been inefficient and limited. While <code>STRING_SPLIT<\/code> improved things, its constraints remained &#8211; until now, that is. SQL Server 2025 introduced the <code>REGEXP_SPLIT_TO_TABLE<\/code> function, offering a more flexible solution for complex scenarios. In this article, Greg Low explains how it works.<\/strong><\/p>\n\n\n\n<p>I&#8217;ve\u00a0worked with <a href=\"https:\/\/www.red-gate.com\/simple-talk\/databases\/sql-server\/t-sql-programming-sql-server\/solving-complex-t-sql-problems-step-by-step\/\" target=\"_blank\" rel=\"noreferrer noopener\">T-SQL<\/a> for many decades and, for the longest time, there were two features that <em>everybody<\/em> seemed to want. The first was a TRIM function, so we\u00a0didn&#8217;t\u00a0have to keep writing <a href=\"https:\/\/support.microsoft.com\/en-gb\/office\/ltrim-rtrim-and-trim-functions-e340ced1-67df-435f-b078-1527a4eddea2#:~:text=Returns%20a%20Variant%20(String)%20containing,and%20trailing%20spaces%20(Trim).&amp;text=The%20required%20stringargument%20is%20any,contains%20Null%2C%20Null%20is%20returned.\" target=\"_blank\" rel=\"noreferrer noopener\">LTRIM and RTRIM together<\/a>.\u00a0Nobody\u00a0seemed to understand why\u00a0that\u00a0didn&#8217;t\u00a0exist.\u00a0The second feature people wanted? A way to split strings efficiently.\u00a0\u00a0<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-the-issue-with-splitting-strings-in-t-sql\">The issue with splitting strings in T-SQL<\/h2>\n\n\n\n<p>Using T-SQL it&#8217;s\u00a0quite easy to build a <a href=\"https:\/\/www.red-gate.com\/simple-talk\/databases\/sql-server\/t-sql-programming-sql-server\/sql-server-functions-the-basics\/#table-valued-functions\" target=\"_blank\" rel=\"noreferrer noopener\">table-valued function<\/a> that can step through a string, character-by-character, and (based on a delimiter) output the delimited strings. The problem is that the performance of these functions is appalling.<\/p>\n\n\n\n<p>When <a href=\"https:\/\/www.red-gate.com\/simple-talk\/databases\/sql-server\/learn\/the-xml-methods-in-sql-server\/\" target=\"_blank\" rel=\"noreferrer noopener\">XML<\/a> support appeared in SQL Server 2005, there were many attempts to create more efficient string-splitting functions. For many strings, these work quite well, but do have a few oddities that you need to cope with. Plus, most have limitations on the strings that you can split.<\/p>\n\n\n\n<p>Ultimately, what was really needed was an efficient and native built-in function.\u00a0\u00a0<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-introducing-string-split-what-is-it-and-how-does-it-work\">Introducing STRING_SPLIT\u00a0&#8211; what is it, and how does it work?<\/h2>\n\n\n\n<p>Finally, in <a href=\"https:\/\/learn.microsoft.com\/en-us\/lifecycle\/products\/sql-server-2016\" target=\"_blank\" rel=\"noreferrer noopener\">SQL Server 2016<\/a> (and <a href=\"https:\/\/learn.microsoft.com\/en-us\/sql\/t-sql\/statements\/alter-database-transact-sql-compatibility-level?view=sql-server-ver17\" target=\"_blank\" rel=\"noreferrer noopener\">database compatibility level 130<\/a>), the T-SQL\u00a0<a href=\"https:\/\/learn.microsoft.com\/en-us\/sql\/t-sql\/functions\/string-split-transact-sql?view=sql-server-ver17\" target=\"_blank\" rel=\"noreferrer noopener\">STRING_SPLIT<\/a>\u00a0function was added, to much rejoicing. Well, that was until we all tried using it! There were several issues:\u00a0<\/p>\n\n\n<div class=\"block-core-list\">\n<ul class=\"wp-block-list\">\n<li>Like all table-valued functions, there was no way to guarantee the order of the output. <a href=\"https:\/\/www.red-gate.com\/simple-talk\/databases\/sql-server\/t-sql-programming-sql-server\/look-up-tables-in-sql\/\" target=\"_blank\" rel=\"noreferrer noopener\">Tables<\/a> (and <a href=\"https:\/\/www.red-gate.com\/simple-talk\/databases\/sql-server\/mastering-sql-views\/#:~:text=VIEWs%20are%20an%20undervalued%20and,it%20as%20a%20virtual%20table.\" target=\"_blank\" rel=\"noreferrer noopener\">views<\/a>)\u00a0don&#8217;t\u00a0have any natural order.\u00a0\u00a0<\/li>\n<\/ul>\n<\/div>\n\n<div class=\"block-core-list\">\n<ul class=\"wp-block-list\">\n<li>We often wanted to work with empty strings as delimiters, because we wanted to output all the characters in the string.\u00a0<\/li>\n<\/ul>\n<\/div>\n\n<div class=\"block-core-list\">\n<ul class=\"wp-block-list\">\n<li>We also often wanted to work with delimiters that involved multiple characters. I know that I did a lot of work with data that was delimited by two pipe characters\u00a0( || ).<\/li>\n<\/ul>\n<\/div>\n\n\n<p>The function required a delimiter of data type\u00a0nchar(1) or\u00a0char(1) &#8211; i.e. it had to be one character.\u00a0<\/p>\n\n\n\n<section id=\"my-first-block-block_17338578e45d657c9672a2e9b5505891\" class=\"my-first-block alignwide\">\n    <div class=\"bg-brand-600 text-base-white py-5xl px-4xl rounded-sm bg-gradient-to-r from-brand-600 to-brand-500 red\">\n        <div class=\"gap-4xl items-start md:items-center flex flex-col md:flex-row justify-between\">\n            <div class=\"flex-1 col-span-10 lg:col-span-7\">\n                <h3 class=\"mt-0 font-display mb-2 text-display-sm\">Fast, reliable and consistent SQL Server development&#8230;<\/h3>\n                <div class=\"child:last-of-type:mb-0\">\n                                            &#8230;with SQL Toolbelt Essentials. 10 ingeniously simple tools for accelerating development, reducing risk, and standardizing workflows.                                    <\/div>\n            <\/div>\n                            <a href=\"https:\/\/www.red-gate.com\/products\/sql-toolbelt-essentials\/\" class=\"btn btn--secondary btn--lg\">Learn more &amp; try for free<\/a>\n                    <\/div>\n    <\/div>\n<\/section>\n\n\n<h3 class=\"wp-block-heading\" id=\"h-explaining-the-ordinal-parameter-what-it-is-and-how-it-works\">Explaining the Ordinal parameter &#8211; what it is and how it works<\/h3>\n\n\n\n<p>Microsoft heard us about the ordering issue. In <a href=\"https:\/\/www.microsoft.com\/en-us\/sql-server\/sql-server-2022\" target=\"_blank\" rel=\"noreferrer noopener\">SQL Server 2022<\/a>, an optional\u00a0<code>enable_ordinal<\/code>\u00a0parameter was added to the <code>STRING_SPLIT<\/code> function.\u00a0<\/p>\n\n\n\n<p>When this was set to a value of 1 instead of just outputting a\u00a0<code>value<\/code>\u00a0column, an\u00a0additional\u00a0<code>ordinal<\/code>\u00a0column was provided. This told you the position of each of the delimited strings. For example:<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:tsql decode:true \" >DECLARE @ValueToSplit nvarchar(max)  \n= N'the quick brown fox jumped over the lazy dog';\n\nSELECT *\nFROM STRING_SPLIT(@ValueToSplit, N' ', 1); <\/pre><\/div>\n\n\n\n<p>The output of this is as follows:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"288\" height=\"414\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/04\/image.png\" alt=\"An image showing the output.\" class=\"wp-image-109452\" srcset=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/04\/image.png 288w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/04\/image-209x300.png 209w\" sizes=\"auto, (max-width: 288px) 100vw, 288px\" \/><\/figure>\n\n\n\n<p>If I wanted the values to be output in the order that they appeared in the string, I could just add:\u00a0<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:tsql decode:true \" >ORDER BY [ordinal]; <\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-however-the-single-character-delimiter-issue-remained\">However, the single character delimiter issue remained&#8230;<\/h3>\n\n\n\n<p>While that was\u00a0a great addition, we still had the issue with the delimiters. Note that when I run either of these queries&#8230;<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:tsql decode:true \" >DECLARE @ValueToSplit nvarchar(max)  \n= N'the quick brown fox jumped over the lazy dog'; \n\nSELECT *\nFROM STRING_SPLIT(@ValueToSplit, N'', 1);\nGO\n\nDECLARE @ValueToSplit nvarchar(max) =\nN'the||quick||brown||fox||jumped||over||the||lazy||dog\n'; \n\nSELECT *\nFROM STRING_SPLIT(@ValueToSplit, N'||', 1); \nGO <\/pre><\/div>\n\n\n\n<p>&#8230;I get this error:<\/p>\n\n\n\n<p><code>Msg 214, Level 16, State 11, Line 48\u00a0<br>Procedure expects parameter 'separator' of type 'nchar(1)\/nvarchar(1)'.\u00a0<\/code><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-that-s-where-regexp-split-to-table-saves-the-day\">That&#8217;s where REGEXP_SPLIT_TO_TABLE saves the day&#8230;<\/h3>\n\n\n\n<p><a href=\"https:\/\/www.red-gate.com\/simple-talk\/collections\/sql-server-2025-articles-guides\/\" target=\"_blank\" rel=\"noreferrer noopener\">SQL Server 2025<\/a> introduced a set of <a href=\"https:\/\/www.red-gate.com\/simple-talk\/featured\/using-regex-in-sql-server-2025-complete-guide\/\" target=\"_blank\" rel=\"noreferrer noopener\">regular expression-related functions<\/a> and one of them finally lets us fix the situation.\u00a0The T-SQL\u00a0<a href=\"https:\/\/learn.microsoft.com\/en-us\/sql\/t-sql\/functions\/regexp-split-to-table-transact-sql?view=sql-server-ver17\" target=\"_blank\" rel=\"noreferrer noopener\">REGEXP_SPLIT_TO_TABLE<\/a>\u00a0function lets us split a string and define the delimiter in a very flexible way.\u00a0Note the following example of working with an empty string delimiter to retrieve all the characters:\u00a0<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:tsql decode:true \" >DECLARE @ValueToSplit nvarchar(4000)  \n= N'the quick brown fox jumped over the lazy dog'; \n\nSELECT *  \nFROM REGEXP_SPLIT_TO_TABLE(@ValueToSplit, N''); <\/pre><\/div>\n\n\n\n<p>That function returns the following (only a few rows shown):\u00a0<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"246\" height=\"489\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/04\/image-1.png\" alt=\"An image showing what the function returns.\" class=\"wp-image-109462\" srcset=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/04\/image-1.png 246w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/04\/image-1-151x300.png 151w\" sizes=\"auto, (max-width: 246px) 100vw, 246px\" \/><\/figure>\n\n\n\n<p>And here is an example of a multi-character delimiter:\u00a0<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:tsql decode:true \" >DECLARE @ValueToSplit nvarchar(4000) =\nN'the||quick||brown||fox||jumped||over||the||lazy||dog\n'; \n\nSELECT *  \nFROM REGEXP_SPLIT_TO_TABLE(@ValueToSplit, N'\\|\\|'); \nGO <\/pre><\/div>\n\n\n\n<p>That now returns:\u00a0<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"273\" height=\"375\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/04\/image-2.png\" alt=\"An image showing what the delimiter returns.\" class=\"wp-image-109463\" srcset=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/04\/image-2.png 273w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/04\/image-2-218x300.png 218w\" sizes=\"auto, (max-width: 273px) 100vw, 273px\" \/><\/figure>\n\n\n\n<p>Note that in both cases, I changed the declared string value to\u00a0<code>nvarchar(4000)<\/code>. The function does not yet support\u00a0<code>nvarchar(max)<\/code> or <code>varchar(max)<\/code> for input data types.\u00a0\u00a0<\/p>\n\n\n\n<p><strong>You may also be interested in:<\/strong><br><a href=\"https:\/\/www.red-gate.com\/simple-talk\/blogs\/sql-server-regular-expression-performance-and-guidelines\/\" target=\"_blank\" rel=\"noreferrer noopener\">SQL Server Regular Expression Performance and Guidelines<br><\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-explaining-the-flag-parameter-in-the-regexp-split-to-table-function-what-it-is-and-how-it-works\">Explaining the flag parameter in the REGEXP_SPLIT_TO_TABLE function &#8211; what it is and how it works<\/h3>\n\n\n\n<p>The <code>REGEXP_SPLIT_TO_TABLE<\/code> function has an optional third parameter.\u00a0It&#8217;s\u00a0particularly important for case-sensitivity, since it doesn&#8217;t\u00a0follow the case-sensitivity rules for the <a href=\"https:\/\/www.red-gate.com\/simple-talk\/databases\/sql-server\/t-sql-programming-sql-server\/questions-sql-server-collations-shy-ask\/#:~:text=1.-,What%20is%20a%20SQL%20Server%20collation%3F,%2C%20database%2C%20or%20column%20level.\" target=\"_blank\" rel=\"noreferrer noopener\">collation<\/a> you&#8217;re working with. Specifically, it&#8217;s case-sensitive even if you are working with a <em>case-insensitive<\/em> collation for your database.<\/p>\n\n\n\n<p>You can add the following flags:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>Flag<\/strong>&nbsp;<\/td><td><strong>Description<\/strong>&nbsp;<\/td><td><strong>Default Value<\/strong>&nbsp;<\/td><\/tr><tr><td><strong>i<\/strong>&nbsp;<\/td><td>Case-insensitive&nbsp;<\/td><td>false&nbsp;<\/td><\/tr><tr><td><strong>m<\/strong>&nbsp;<\/td><td>Multi-line mode&nbsp;<\/td><td>false&nbsp;<\/td><\/tr><tr><td><strong>s<\/strong>&nbsp;<\/td><td>Allows .&nbsp;(period) to&nbsp;match a new line (\\n)&nbsp;<\/td><td>false&nbsp;<\/td><\/tr><tr><td><strong>c<\/strong>&nbsp;<\/td><td>Case-sensitive&nbsp;<\/td><td>true&nbsp;<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Multi-line mode is particularly interesting. Without it, the beginning and end of the text are used to delimit the string. When enabled, however, the standard $ and ^ characters that work elsewhere with regular expressions can also be used.\u00a0<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-the-verdict\">The verdict\u00a0<\/h2>\n\n\n\n<p>With the addition of <code>REGEXP_SPLIT_TO_TABLE<\/code>,\u00a0we&#8217;re\u00a0now much, much closer to having workable built-in string splitting.<\/p>\n\n\n\n<p>Performance-wise,\u00a0you&#8217;ll\u00a0still be better using <code>STRING_SPLIT<\/code> for situations where it is capable, but for\u00a0situations that it\u00a0doesn&#8217;t\u00a0support, <code>REGEXP_SPLIT_TO_TABLE<\/code> should fix most issues.\u00a0I&#8217;ve\u00a0seen some discussions saying we might be able to use new <a href=\"https:\/\/www.red-gate.com\/simple-talk\/databases\/oracle-databases\/json-for-absolute-beginners-part-1-introduction\/\" target=\"_blank\" rel=\"noreferrer noopener\">JSON<\/a> functions as a workaround, but\u00a0I&#8217;ve\u00a0been happy enough with the performance so far.\u00a0<\/p>\n\n\n\n<p>The only remaining issue for me is that I often need to work with\u00a0nvarchar(max) and varchar(max) strings. I hope that gets addressed in a future version.<\/p>\n\n\n\n<section id=\"my-first-block-block_653a33a45b5ef1c844ae972e081c27a3\" class=\"my-first-block alignwide\">\n    <div class=\"bg-brand-600 text-base-white py-5xl px-4xl rounded-sm bg-gradient-to-r from-brand-600 to-brand-500 red\">\n        <div class=\"gap-4xl items-start md:items-center flex flex-col md:flex-row justify-between\">\n            <div class=\"flex-1 col-span-10 lg:col-span-7\">\n                <h3 class=\"mt-0 font-display mb-2 text-display-sm\">Simple Talk is brought to you by Redgate Software<\/h3>\n                <div class=\"child:last-of-type:mb-0\">\n                                            Take control of your databases with the trusted Database DevOps solutions provider. Automate with confidence, scale securely, and unlock growth through AI.                                    <\/div>\n            <\/div>\n                            <a href=\"https:\/\/www.red-gate.com\/solutions\/overview\/\" class=\"btn btn--secondary btn--lg\">Discover how Redgate can help you<\/a>\n                    <\/div>\n    <\/div>\n<\/section>\n\n\n<section id=\"faq\" class=\"faq-block my-5xl\">\n    <h2>FAQs: How to use REGEXP_SPLIT_TO_TABLE in SQL Server<\/h2>\n\n                        <h3 class=\"mt-4xl\">1. What is STRING_SPLIT in SQL Server?<\/h3>\n            <div class=\"faq-answer\">\n                <p data-start=\"263\" data-end=\"446\">STRING_SPLIT is a built-in T-SQL function introduced in SQL Server 2016 that splits a string into rows based on a single-character delimiter.<\/p>\n            <\/div>\n                    <h3 class=\"mt-4xl\">2. What limitations does STRING_SPLIT have?<\/h3>\n            <div class=\"faq-answer\">\n                <p data-start=\"448\" data-end=\"650\">STRING_SPLIT only supports single-character delimiters, doesn\u2019t guarantee output order (without enable_ordinal), and cannot handle empty string delimiters.<\/p>\n            <\/div>\n                    <h3 class=\"mt-4xl\">3. What is the enable_ordinal parameter?<\/h3>\n            <div class=\"faq-answer\">\n                <p data-start=\"652\" data-end=\"843\">Added in SQL Server 2022, enable_ordinal returns an extra column showing the position of each split value, allowing you to order results correctly.<\/p>\n            <\/div>\n                    <h3 class=\"mt-4xl\">4. What is REGEXP_SPLIT_TO_TABLE?<\/h3>\n            <div class=\"faq-answer\">\n                <p data-start=\"845\" data-end=\"1031\">REGEXP_SPLIT_TO_TABLE is a SQL Server 2025 function that uses regular expressions to split strings, enabling multi-character and flexible delimiters.<\/p>\n            <\/div>\n                    <h3 class=\"mt-4xl\">5. When should I use REGEXP_SPLIT_TO_TABLE instead of STRING_SPLIT?<\/h3>\n            <div class=\"faq-answer\">\n                <p data-start=\"1033\" data-end=\"1247\">Use REGEXP_SPLIT_TO_TABLE when you need multi-character delimiters, regex patterns, or more flexible splitting that STRING_SPLIT cannot handle.<\/p>\n            <\/div>\n                    <h3 class=\"mt-4xl\">6. Does REGEXP_SPLIT_TO_TABLE support nvarchar(max)?<\/h3>\n            <div class=\"faq-answer\">\n                <p data-start=\"1249\" data-end=\"1398\">No, currently it only supports nvarchar(4000) and varchar(4000), not max-length string types.<\/p>\n            <\/div>\n                    <h3 class=\"mt-4xl\">7. Is STRING_SPLIT or REGEXP_SPLIT_TO_TABLE faster?<\/h3>\n            <div class=\"faq-answer\">\n                <div class=\"flex flex-col text-sm pb-25\">\n<section class=\"text-token-text-primary w-full focus:outline-none [--shadow-height:45px] has-data-writing-block:pointer-events-none has-data-writing-block:-mt-(--shadow-height) has-data-writing-block:pt-(--shadow-height) [&amp;:has([data-writing-block])&gt;*]:pointer-events-auto scroll-mt-[calc(var(--header-height)+min(200px,max(70px,20svh)))]\" dir=\"auto\" data-turn-id=\"request-WEB:50ed2bc0-5124-4fce-88ad-b3bb954d89a0-0\" data-testid=\"conversation-turn-2\" data-scroll-anchor=\"true\" data-turn=\"assistant\">\n<div class=\"text-base my-auto mx-auto pb-10 [--thread-content-margin:var(--thread-content-margin-xs,calc(var(--spacing)*4))] @w-sm\/main:[--thread-content-margin:var(--thread-content-margin-sm,calc(var(--spacing)*6))] @w-lg\/main:[--thread-content-margin:var(--thread-content-margin-lg,calc(var(--spacing)*16))] px-(--thread-content-margin)\">\n<div class=\"[--thread-content-max-width:40rem] @w-lg\/main:[--thread-content-max-width:48rem] mx-auto max-w-(--thread-content-max-width) flex-1 group\/turn-messages focus-visible:outline-hidden relative flex w-full min-w-0 flex-col agent-turn\">\n<div class=\"flex max-w-full flex-col gap-4 grow\">\n<div class=\"min-h-8 text-message relative flex w-full flex-col items-end gap-2 text-start break-words whitespace-normal outline-none keyboard-focused:focus-ring [.text-message+&amp;]:mt-1\" dir=\"auto\" data-message-author-role=\"assistant\" data-message-id=\"772ed2d1-ff81-4e9e-b40d-db1342344ec2\" data-message-model-slug=\"gpt-5-3\" data-turn-start-message=\"true\">\n<div class=\"flex w-full flex-col gap-1 empty:hidden\">\n<div class=\"markdown prose dark:prose-invert w-full wrap-break-word light markdown-new-styling\">\n<p data-start=\"1400\" data-end=\"1584\" data-is-last-node=\"\" data-is-only-node=\"\">STRING_SPLIT is generally faster for simple use cases, while REGEXP_SPLIT_TO_TABLE offers more flexibility for complex scenarios.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/section>\n<\/div>\n<div class=\"pointer-events-none h-px w-px absolute bottom-0\" aria-hidden=\"true\" data-edge=\"true\">\u00a0<\/div>\n            <\/div>\n            <\/section>\n","protected":false},"excerpt":{"rendered":"<p>Learn how to split strings efficiently in T-SQL using STRING_SPLIT and the REGEXP_SPLIT_TO_TABLE function in SQL Server 2025. Discover limitations, performance tips, and when to use each function.&hellip;<\/p>\n","protected":false},"author":346483,"featured_media":109464,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[143523,53,143524],"tags":[4168,4170,4150,4151,159319,4252],"coauthors":[159368],"class_list":["post-109450","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-databases","category-featured","category-sql-server","tag-database","tag-database-administration","tag-sql","tag-sql-server","tag-sqlserver2025publicpreview","tag-t-sql-programming"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/109450","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/users\/346483"}],"replies":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/comments?post=109450"}],"version-history":[{"count":5,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/109450\/revisions"}],"predecessor-version":[{"id":109727,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/109450\/revisions\/109727"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/media\/109464"}],"wp:attachment":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/media?parent=109450"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/categories?post=109450"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/tags?post=109450"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/coauthors?post=109450"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}