SDU Tools: Table of Numbers in SQL Server T-SQL
For anyone who’s worked with SQL Server for a long time, you’ll know that one of the common requests is that a table of numbers would be useful. Yes, just a table with 1, 2, 3, 4 and so on. Often in a query, you need just a certain set of values.
In our free SDU Tools, we’ve added a function to do that in a reasonably efficient way.
In the main screenshot, you can see it in use. We made it a little more flexible in that you can specify the starting number, and then specify the number of numbers.
2018-04-18