{"id":111697,"date":"2026-07-08T12:00:00","date_gmt":"2026-07-08T12:00:00","guid":{"rendered":"https:\/\/www.red-gate.com\/simple-talk\/?p=111697"},"modified":"2026-07-08T12:27:20","modified_gmt":"2026-07-08T12:27:20","slug":"whats-missing-in-t-sql-heres-my-t-sql-wish-list-of-features-that-developers-actually-need-in-sql-server","status":"publish","type":"post","link":"https:\/\/www.red-gate.com\/simple-talk\/databases\/sql-server\/whats-missing-in-t-sql-heres-my-t-sql-wish-list-of-features-that-developers-actually-need-in-sql-server\/","title":{"rendered":"What&#8217;s missing in T-SQL? My wish list of features that developers actually need in SQL Server"},"content":{"rendered":"\n<p><strong>Edward Pollack recently wrote an <a href=\"https:\/\/www.red-gate.com\/simple-talk\/databases\/sql-server\/5-t-sql-features-that-should-already-exist-2026-sql-server-wish-list\/\" target=\"_blank\" rel=\"noreferrer noopener\">excellent wish list<\/a> for T-SQL features he&#8217;d like to see in an upcoming version of SQL Server. Now, it&#8217;s my turn. This article covers what I&#8217;d like to see the most<\/strong>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-extensibility-added-to-sql-server\">Extensibility added to SQL Server<\/h2>\n\n\n\n<p>I&#8217;ve had this wish for as long as I&#8217;ve worked with <a href=\"https:\/\/www.red-gate.com\/simple-talk\/databases\/sql-server\/\" target=\"_blank\" rel=\"noreferrer noopener\">SQL Server<\/a>, and I started with it in 1992! I can&#8217;t tell you how many times I&#8217;ve been in meetings with the product group, they show us a new feature, and I ask how I can build things that would enhance or complete what they&#8217;ve done. The response has almost always been &#8220;this is version 1; hopefully we&#8217;ll get to <strong>extensibility<\/strong> in version 2 or later&#8221;.<\/p>\n\n\n\n<p>And, put simply, they never get there.<\/p>\n\n\n\n<p>The problem I see with this, is that it often undermines &#8211; or worse, <em>wastes<\/em> &#8211; the product group&#8217;s own work. If they ship a feature and it&#8217;s not complete, there&#8217;s no way for us to fill in enough of what&#8217;s missing to make it useful. Then, when the feature doesn&#8217;t get enough traction in the market, it often just falls by the wayside. There are endless examples of this, but let me pick just one. <\/p>\n\n\n\n<p>Back in <a href=\"https:\/\/www.red-gate.com\/simple-talk\/databases\/sql-server\/learn\/building-my-first-sql-server-2005-clr\/\" target=\"_blank\" rel=\"noreferrer noopener\">SQL Server 2005, Microsoft added the ability to create our own data types as part of SQL CLR<\/a>. It was great to see some extensibility appearing but, as soon as I looked into it, I realized I couldn&#8217;t use it to create what I wanted as there was no way to appropriately index the data type. I could only index properties of the data type via <a href=\"https:\/\/www.red-gate.com\/simple-talk\/databases\/sql-server\/performance-sql-server\/computed-column-performance-in-sql-server\/\" target=\"_blank\" rel=\"noreferrer noopener\">computed columns<\/a> &#8211; not the data type itself.<\/p>\n\n\n\n<p>This is because, with new data types, you often need a different type of <a href=\"https:\/\/www.red-gate.com\/simple-talk\/databases\/sql-server\/learn\/sql-server-index-basics\/\" target=\"_blank\" rel=\"noreferrer noopener\">index<\/a>. So, I kept asking for the ability to create a custom index type, but the response was always along the lines of, <em>&#8220;we don&#8217;t really need a new index type.&#8221;<\/em><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-but-clearly-we-did-need-a-new-index-type\">But clearly we <em>did<\/em> need a new index type&#8230;<\/h3>\n\n\n\n<p>&#8230;and this has been proven <em>again and again<\/em> over the years. With the <a href=\"https:\/\/www.red-gate.com\/simple-talk\/databases\/sql-server\/learn\/working-with-the-xml-data-type-in-sql-server\/\" target=\"_blank\" rel=\"noreferrer noopener\">XML data type<\/a>, Microsoft added two new index types. In SQL Server 2008, when they added their own new <a href=\"https:\/\/www.databasejournal.com\/ms-sql\/data-types-in-sql-server-2008\/\" target=\"_blank\" rel=\"noreferrer noopener\">SQL CLR-based data types<\/a> for geometry and geography, they added a new <a href=\"https:\/\/www.sqlskills.com\/blogs\/paul\/sql-server-2008-spatial-indexes\/\" target=\"_blank\" rel=\"noreferrer noopener\">spatial index<\/a>. For me, this should have been just one instance of a new custom index type. <\/p>\n\n\n\n<p>It was no surprise, then, to see a new index type created when <a href=\"https:\/\/www.red-gate.com\/simple-talk\/databases\/sql-server\/t-sql-programming-sql-server\/effective-strategies-for-storing-and-parsing-json-in-sql-server\/\" target=\"_blank\" rel=\"noreferrer noopener\">JSON<\/a> was later added. When the <a href=\"https:\/\/learn.microsoft.com\/en-us\/sql\/t-sql\/data-types\/vector-data-type?view=sql-server-ver17&amp;tabs=csharp\" target=\"_blank\" rel=\"noreferrer noopener\">vector data type<\/a> was introduced, so was a new type of index for it. Since I now work with <a href=\"https:\/\/www.red-gate.com\/simple-talk\/cloud\/azure\/\" target=\"_blank\" rel=\"noreferrer noopener\">Azure SQL Database<\/a> so much, and Microsoft removed their initial support for SQL CLR, we try to avoid using it in any of our SQL Server work. And we&#8217;re back to having no meaningful way to extend the language. <\/p>\n\n\n\n<p>Meanwhile, with my other work in <a href=\"https:\/\/www.red-gate.com\/simple-talk\/databases\/postgresql\/\" target=\"_blank\" rel=\"noreferrer noopener\">PostgreSQL<\/a>, it&#8217;s something I really appreciate &#8211; and it&#8217;s part of the reason why the platform is considered more &#8220;developer-friendly&#8221; by many people. I&#8217;d like to see the SQL Server team think more about building an ecosystem rather than just shipping a product where they feel they need to supply <em>everything<\/em>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-constants-in-sql-server\">Constants in SQL Server<\/h2>\n\n\n\n<p>I review large amounts of <a href=\"https:\/\/www.red-gate.com\/simple-talk\/databases\/sql-server\/t-sql-programming-sql-server\/\" target=\"_blank\" rel=\"noreferrer noopener\">T-SQL<\/a> and I so often see hard-coded values throughout the code. Performance-wise, it&#8217;s totally fine to write code like:<\/p>\n\n\n\n<p><code>WHERE AdditionalStatus = 146<\/code><\/p>\n\n\n\n<p>But as for code quality? What on earth is that &#8216;146&#8217;? Even if there is a comment there to explain it, it&#8217;s not needed.<\/p>\n\n\n\n<p>Instead, we can put values like this in a variable, perhaps at the top of our code:<\/p>\n\n\n\n<p><code>DECLARE @EXTENDED_STAY_STATUS int = 146;<\/code><\/p>\n\n\n\n<p>and use it in code:<\/p>\n\n\n\n<p><code>WHERE AdditionalStatus = @EXTENDED_STAY_STATUS<\/code><\/p>\n\n\n\n<p>Unfortunately, though, it might not execute the same. You see this all the time when someone is trying to debug <a href=\"https:\/\/www.red-gate.com\/simple-talk\/databases\/sql-server\/t-sql-programming-sql-server\/40-problems-sql-server-stored-procedure\/\" target=\"_blank\" rel=\"noreferrer noopener\">stored procedure<\/a> code &#8211; they replace the parameters at the top with variables and then find it doesn&#8217;t run the same.<\/p>\n\n\n\n<p>If we had <em>true<\/em> constants, the optimizer could know about them, and use them like literal values:<\/p>\n\n\n\n<p><code>DECLARE @EXTENDED_STAY_STATUS CONSTANT int = 146;<\/code><\/p>\n\n\n\n<p>I&#8217;d like to go even further and have the ability to declare constants at the database level &#8211; and potentially at the server level, too (not just session level.)<\/p>\n\n\n\n<section id=\"my-first-block-block_3fb972cd8c2759533d3d042cfbbe9557\" 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\">Enjoying this article? Subscribe to the Simple Talk newsletter<\/h3>\n                <div class=\"child:last-of-type:mb-0\">\n                                            Get selected articles, event information, podcasts and other industry content delivered straight to your inbox.                                    <\/div>\n            <\/div>\n                                            <a href=\"https:\/\/www.red-gate.com\/simple-talk\/subscribe\/\" class=\"btn btn--secondary btn--lg\" aria-label=\"Subscribe now: Enjoying this article? Subscribe to the Simple Talk newsletter\">Subscribe now<\/a>\n                    <\/div>\n    <\/div>\n<\/section>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-consistency-in-sql-server\">Consistency in SQL Server<\/h2>\n\n\n\n<p>Given the requirement for backward compatibility, this one is hard&#8230;but I <em>really<\/em> wish there was more consistency in how features and language elements are designed for SQL Server. We have names like <code>DATETIMEOFFSETFROMPARTS<\/code>, for example, but also have <code>DENSE_RANK<\/code>, <code>COUNT_BIG<\/code>, etc. There never seems to be any rationale for when names have spaces separating or are just run together.<\/p>\n\n\n\n<p>The bigger issue, though, is the logical inconsistency. Even in SQL Server 2025, functions were added for <code>EDIT_DISTANCE()<\/code> and <code><a href=\"https:\/\/learn.microsoft.com\/en-us\/sql\/t-sql\/functions\/jaro-winkler-similarity-transact-sql?view=sql-server-ver17\" target=\"_blank\" rel=\"noreferrer noopener\">JARO_WINKLER_SIMILARITY()<\/a><\/code>. What&#8217;s wrong with that, you might ask? Well, one of them &#8211; <code>EDIT_DISTANCE<\/code> &#8211; is named after what it&#8217;s measuring. And the other one &#8211; <code>JARO_WINKLER_SIMILARITY<\/code> &#8211; is named after the algorithm used! <\/p>\n\n\n\n<p>You&#8217;d hope the naming would follow the same pattern: either named after the effect, or after the algorithm. I&#8217;d expect that across versions, but even more so within a single version of the product. <code>EDIT_DISTANCE()<\/code> should probably have been called <code>LEVENSHTEIN_DISTANCE()<\/code> for the <a href=\"https:\/\/www.red-gate.com\/simple-talk\/other\/string-comparisons-in-sql-edit-distance-and-the-levenshtein-algorithm\/\" target=\"_blank\" rel=\"noreferrer noopener\">Levenshtein<\/a> (or Damerau-Levenshtein) algorithm.<\/p>\n\n\n\n<p>I&#8217;d also like to see consistency regarding abbreviations. For example, I wish <code>EOMONTH()<\/code> was <code>END_OF_MONTH()<\/code>. Did we really need to save 3 characters in the same version as other functions with really long names were shipped? I&#8217;m told it was named after an old Excel function, but is that <em>really<\/em> how we want new language features designed? <\/p>\n\n\n\n<p>Also, while we&#8217;re at it &#8211; why is there no <code>START_OF_MONTH()<\/code>?! And we had <code>tinyint<\/code>, <code>smallint<\/code>, <code>int<\/code>, and <code>bigint<\/code>, but then we got <code>smalldatetime<\/code>, <code>datetime<\/code>, and <code>datetime2<\/code>.<\/p>\n\n\n\n<p>Then there&#8217;s <code>SYSDATETIME()<\/code>, <code>SYSDATETIMEOFFSET()<\/code>, and <code>SYSUTCDATETIME()<\/code>. You would have guessed the new option for getting just the date would be <code>SYSDATE()<\/code> right? No! It&#8217;s <code>CURRENT_DATE<\/code>. We still don&#8217;t have <code>SYSUTCDATE()<\/code>, either.<\/p>\n\n\n\n<p>We don&#8217;t need to confuse users like this.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-enumerations-in-sql-server\">Enumerations in SQL Server<\/h2>\n\n\n\n<p><a href=\"https:\/\/www.sqlservercentral.com\/articles\/sql-server-enum-implementation-a-single-row-view-strategy-for-avoiding-magic-values\" target=\"_blank\" rel=\"noreferrer noopener\">Enumerations<\/a> are a static ordered set of values. For example, I might have the need to store a column called <em>NextAction<\/em>, with the allowable values being:<\/p>\n\n\n<div class=\"block-core-list\">\n<ul class=\"wp-block-list\">\n<li>Open<br><br><\/li>\n\n\n\n<li>Process<br><br><\/li>\n\n\n\n<li>Close<br><br><\/li>\n\n\n\n<li>Delete<\/li>\n<\/ul>\n<\/div>\n\n\n<p>In T-SQL today, there are two options at our disposal. First, we could define a simple table called <em>Actions<\/em>, where we have one column called <em>Action<\/em>, add those four rows, then define a <a href=\"https:\/\/www.red-gate.com\/simple-talk\/databases\/sql-server\/t-sql-programming-sql-server\/questions-about-primary-and-foreign-keys-you-were-too-shy-to-ask\/\" target=\"_blank\" rel=\"noreferrer noopener\">foreign key<\/a> from the <em>NextAction<\/em> column to the <em>Actions.Action<\/em> column. This would work.<\/p>\n\n\n\n<p>However, if we wanted them to appear in the order above (Open\/Process\/Close\/Delete), we\u2019d need to have another column &#8211; perhaps an identity or sequence &#8211; in the Actions table to specify that order. Additionally, to limit the range of allowed values in the <em>NextAction<\/em> column, you could add a <a href=\"https:\/\/www.red-gate.com\/simple-talk\/databases\/theory-and-design\/the-check-constraint\/\" target=\"_blank\" rel=\"noreferrer noopener\"><code>CHECK<\/code> constraint<\/a>.<\/p>\n\n\n\n<p>There are many scenarios where I just wish we could use enumerations instead. After all, PostgreSQL supports them already. The SQL Server equivalent could look like this, perhaps:<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:tsql decode:true \">CREATE TYPE Action\nAS ENUM('Open', 'Process', 'Close', 'Delete');\n\nCREATE TABLE dbo.Processes\n(\n&nbsp;&nbsp;&nbsp; ...\n&nbsp;&nbsp;&nbsp; LastAction Action,\n&nbsp;&nbsp;&nbsp; NextAction Action,\n&nbsp;&nbsp;&nbsp; ...\n);<\/pre><\/div>\n\n\n\n<p>I&#8217;d also like to use them not just for simple ordered lists but, instead, as a set of enumerated constants. For example:<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:tsql decode:true \">CREATE TYPE RequiredAction AS ENUM CONSTANT int\n(\n&nbsp;&nbsp;&nbsp; Open = 4279,\n&nbsp;&nbsp;&nbsp; Process = 2327,\n&nbsp;&nbsp;&nbsp; Close = 2232,\n&nbsp;&nbsp;&nbsp; Delete = 2423\n);<\/pre><\/div>\n\n\n\n<p>This would allow me to write code like <code>WHERE NextAction = RequiredAction.Close;<\/code>, which would work really well with <a href=\"https:\/\/www.red-gate.com\/hub\/product-learning\/hub\/sql-intellisense-and-autocomplete-in-ssms-and-sql-prompt\/\" target=\"_blank\" rel=\"noreferrer noopener\">IntelliSense<\/a> &#8211; just like it does in <a href=\"https:\/\/www.red-gate.com\/simple-talk\/development\/how-to-match-names-in-c-without-exact-string-comparisons\/\" target=\"_blank\" rel=\"noreferrer noopener\">C#<\/a> and other languages. <\/p>\n\n\n\n<p>It could also be used to provide every constant required: <code>WHERE AdditionalStatus = CONSTANTS.ExtendedStayStatus<\/code>&#8230;<\/p>\n\n\n\n<p>&#8230;and extended to be used for database and server constants: <code>OR LastStatus = DATABASE_CONSTANTS.FinalStayStatus<\/code><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-code-libraries-in-sql-server\">Code libraries in SQL Server<\/h2>\n\n\n\n<p>One of the free resources I provide is <a href=\"https:\/\/sqldownunder.com\/sdutools\" target=\"_blank\" rel=\"noreferrer noopener\">SDU Tools<\/a>. It&#8217;s a library of functions, views, procedures, etc, that you can add to a database. That&#8217;s OK, but I really wish you <em>didn&#8217;t<\/em> need to add them to every database. I should be able to create a library that&#8217;s added to the server and can then be used from <em>any<\/em> database. More importantly, I wish I could create functions that work, and perform at the same speed as, the ones built into T-SQL.<\/p>\n\n\n\n<p>There are so many things we <em>can&#8217;t<\/em> do in it when we build functions. We can&#8217;t handle overloaded and optional parameter types properly, for example, and we can&#8217;t have dynamic output data types like the recently added <a href=\"https:\/\/www.red-gate.com\/simple-talk\/databases\/sql-server\/t-sql-programming-sql-server\/on-handling-dates-in-sql\/\" target=\"_blank\" rel=\"noreferrer noopener\">date-related functions<\/a> <code>DATETRUNC()<\/code> and <code>DATE_BUCKET()<\/code>. And again, note the inconsistency in their names.<\/p>\n\n\n\n<p>These are concepts that already exist in other database engines. SQL Server really needs them, too.<\/p>\n\n\n\n<section id=\"my-first-block-block_5f4f3bff7fe4ffdb50e06d22bc1e6b5e\" 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\" aria-label=\"Learn more &amp; try for free: Fast, reliable and consistent SQL Server development...\">Learn more &amp; try for free<\/a>\n                    <\/div>\n    <\/div>\n<\/section>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-what-else-i-d-like-to-see-changed-or-added-to-sql-server\">What else I&#8217;d like to see changed (or added) to SQL Server<\/h2>\n\n\n\n<p>Here&#8217;s what else I&#8217;d like to see changed, or added, to SQL Server.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-drop-database-if-exists\"><code>DROP DATABASE IF EXISTS<\/code><\/h3>\n\n\n\n<p><strong><code>DROP DATABASE IF EXISTS<\/code><\/strong> is currently useless as it fails if anyone is connected to the database. The suggested option for changing the database to single user first is not reliable, as it has to be done from master. Ultimately, it needs to have a <code>WITH ROLLBACK IMMEDIATE<\/code> option added to it.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-alter-table-drop-column\"><code>ALTER TABLE DROP COLUMN<\/code><\/h3>\n\n\n\n<p><strong><code>ALTER TABLE DROP COLUMN<\/code><\/strong> needs an option to drop any <a href=\"https:\/\/www.red-gate.com\/simple-talk\/databases\/sql-server\/t-sql-programming-sql-server\/declarative-sql-using-check-default\/\" target=\"_blank\" rel=\"noreferrer noopener\">default constraint<\/a> on the column. Other engines like PostgreSQL don&#8217;t allow you to name default constraints, so don&#8217;t have this issue. In T-SQL, you need to know the name of the constraint to drop it. <\/p>\n\n\n\n<p>Ideally, though, default constraints shouldn&#8217;t have an exposed name in the first place. Encouraging users to use a system-generated name &#8211; and then requiring them to know the name <em>before<\/em> you can drop a column &#8211; just doesn&#8217;t make sense.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-arrays\">Arrays<\/h3>\n\n\n\n<p>When I first started using SQL Server in 1992, I immediately missed having <a href=\"https:\/\/www.w3schools.com\/programming\/prog_arrays.php\" target=\"_blank\" rel=\"noreferrer noopener\">arrays<\/a>. The argument always was that they were a non-relational concept, but there are many scenarios where they make sense.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-file-i-o-input-output\">File I\/O (input\/output)<\/h3>\n\n\n\n<p>In <a href=\"https:\/\/www.red-gate.com\/simple-talk\/databases\/sql-server\/5-t-sql-features-that-should-already-exist-2026-sql-server-wish-list\/\" target=\"_blank\" rel=\"noreferrer noopener\">his wish list<\/a>, Edward made a good point about working with other file types, particularly compressed file formats like <a href=\"https:\/\/www.red-gate.com\/simple-talk\/databases\/sql-server\/customizing-the-export-and-import-of-parquet-files-in-sql-server\/\" target=\"_blank\" rel=\"noreferrer noopener\">parquet<\/a>. This has always been a weakness in SQL Server, but it&#8217;s not just file input. If you want to output a CSV or parquet file, it should be trivial &#8211; and in other database engines, it is. But not in SQL Server.<\/p>\n\n\n\n<p>On a related note, far too many commands in T-SQL (like <code>OPENROWSET()<\/code>) don&#8217;t take variables &#8211; they require literal values. As a result, we end up writing a lot of dynamic code &#8211; making our T-SQL code even messier than it should be. This needs to be fixed. The options for file input\/output should work well for both local file systems (on-premises), and <a href=\"https:\/\/www.red-gate.com\/simple-talk\/databases\/sql-server\/database-administration-sql-server\/storage-101-cloud-storage\/\" target=\"_blank\" rel=\"noreferrer noopener\">cloud-based storage<\/a> systems (both on-premises and cloud-based SQL).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-utf-8\">UTF-8<\/h3>\n\n\n\n<p>I&#8217;m not a fan of how <a href=\"https:\/\/www.w3schools.com\/charsets\/ref_html_utf8.asp\" target=\"_blank\" rel=\"noreferrer noopener\">UTF-8<\/a> has been implemented within SQL Server. The biggest issue, for me, is defining columns. If I say <code>VARCHAR(10)<\/code> with UTF-8, I want that to mean up 10 characters. I don&#8217;t want it to mean &#8220;somewhere between 2 and 10 characters&#8221; like it currently does (since it&#8217;s based on bytes and depends on which characters you happen to store.)<\/p>\n\n\n\n<p>How is this useful to a developer? It&#8217;s worth noting that again, PostgreSQL does this sensibly. At least give us the option to say <code>VARCHAR(10 CHARACTERS)<\/code> or similar, given we probably can&#8217;t fix the current implementation.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-string-split\">STRING_SPLIT<\/h3>\n\n\n\n<p>The SQL Server team have made <a href=\"https:\/\/www.red-gate.com\/simple-talk\/databases\/sql-server\/can-sql-server-2025s-regexp_split_to_table-fix-string_split-in-t-sql\/\" target=\"_blank\" rel=\"noreferrer noopener\">several attempts at <code>STRING_SPLIT<\/code><\/a>, but it&#8217;s still not where I want it to be. For example, the delimiter says it needs to be a single character. Sometimes I want to use an empty delimiter as I want to return all the characters in the string one-by-one. Other times, I want to handle multi-character delimiters like double-pipes ( &#8216;||&#8217; ), as that&#8217;s what&#8217;s in the incoming data.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-shortcut-operators\">Shortcut operators<\/h3>\n\n\n\n<p>It was great to see <code>IS DISTINCT FROM<\/code> and <code>IS NOT DISTINCT FROM<\/code> added to SQL Server, but I really wish they had shortcut operators like <code>WHERE SomeValue == @ProvidedValue<\/code> and <code>== meant \"IS NOT DISTINCT FROM\"<\/code>. <\/p>\n\n\n\n<p>The negative form of this is the most commonly used, and we did get &lt;&lt; and &gt;&gt; for <code>LEFT_SHIFT<\/code> and <code>RIGHT_SHIFT<\/code>, which of course are welcome but probably won&#8217;t be used as often.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-natural-joins\">Natural joins<\/h3>\n\n\n\n<p>If we&#8217;re just joining tables using declared foreign keys, we should be able to just ask for a natural join that follows the keys. We shouldn&#8217;t need to spell it all out in <code>ON<\/code> clauses. Bonus points if we could omit interim tables like we can in <a href=\"https:\/\/www.red-gate.com\/simple-talk\/databases\/sql-server\/bi-sql-server\/using-the-dax-calculate-and-values-functions\/\" target=\"_blank\" rel=\"noreferrer noopener\">DAX<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-upcoming-possibilities-other-sql-server-suggestions\">Upcoming possibilities (other SQL Server suggestions)<\/h2>\n\n\n\n<p>For some excellent coverage of suggested SQL changes from the PostgreSQL BMA meeting, which took place June 2026 in Stockholm, Sweden, I&#8217;d suggest reading <a href=\"https:\/\/peter.eisentraut.org\/blog\/2026\/06\/30\/waiting-for-sql-202y-stockholm-meeting-report\" target=\"_blank\" rel=\"noreferrer noopener\">this article<\/a>. <\/p>\n\n\n\n<p>From that article, I think the following are worth considering:<\/p>\n\n\n\n<p><strong><code>QUALIFY<\/code><\/strong><br>We use <code>WHERE<\/code> after <code>FROM<\/code>, and <code>HAVING<\/code> after <code>GROUP BY<\/code>. <code>QUALIFY<\/code> applies a filter at the window function level.<\/p>\n\n\n\n<p><strong><code>INSERT BY NAME<\/code><\/strong> <br>This suggestion allows matching up column lists in <a href=\"https:\/\/www.red-gate.com\/simple-talk\/databases\/sql-server\/learn\/working-with-the-insert-statement-in-sql-server\/\" target=\"_blank\" rel=\"noreferrer noopener\"><code>INSERT<\/code> statements<\/a> with returned <code><a href=\"https:\/\/www.red-gate.com\/simple-talk\/databases\/sql-server\/t-sql-programming-sql-server\/the-basic-t-sql-select-statement\/#:~:text=The%20SELECT%20statement%20is%20the,and%20GROUP%20BY%20clauses%2C%20respectively.\" target=\"_blank\" rel=\"noreferrer noopener\">SELECT<\/a><\/code> values based on the names of the columns rather than position.<\/p>\n\n\n\n<p><code><strong>SELECT LIST EXCLUDE<\/strong><\/code><br>There&#8217;s a common requirement to select all the columns in a table except for one or two. An <code>EXCLUDE<\/code> clause can do just that. But the suggestion here is to go further, allowing <code>REPLACE<\/code> and <code>RENAME<\/code> clauses as well. Interesting.<\/p>\n\n\n\n<p><code><strong>JOIN TO ONE<\/strong><\/code><br>This suggestion is to add a <code>TO ONE<\/code> clause to a <code>JOIN<\/code>. The best use case for me would be where I have a <code>LEFT OUTER JOIN<\/code> and instead of matching <em>zero or more<\/em> rows, I want to only match <em>zero or one<\/em> row. If <em>more<\/em> than one is matched, then an error is thrown. Also interesting.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-summary\">Summary<\/h2>\n\n\n\n<p>Back in 2014, I remember asking a product group member what was new in T-SQL, and they responded by asking me why I&#8217;d even want any enhancements. He thought that <em>&#8220;T-SQL is done&#8221;<\/em>, as though it was complete. <\/p>\n\n\n\n<p>I&#8217;m so glad that, now, the SQL Server team isn&#8217;t thinking that way. They&#8217;ve started putting in real effort in this area, and it&#8217;s good to see. There&#8217;s a lot to do.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A veteran SQL Server expert&#8217;s wish list for T-SQL: true constants, enumerations, extensibility, better naming consistency, and more. See what&#8217;s missing.&hellip;<\/p>\n","protected":false},"author":346483,"featured_media":110581,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[143523,53,143524,143531],"tags":[4150,4151,4252],"coauthors":[159368],"class_list":["post-111697","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-databases","category-featured","category-sql-server","category-t-sql-programming-sql-server","tag-sql","tag-sql-server","tag-t-sql-programming"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/111697","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=111697"}],"version-history":[{"count":9,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/111697\/revisions"}],"predecessor-version":[{"id":111763,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/111697\/revisions\/111763"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/media\/110581"}],"wp:attachment":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/media?parent=111697"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/categories?post=111697"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/tags?post=111697"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/coauthors?post=111697"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}