SQL Server, like many relational database management systems, has specific limitations that developers need to be aware of when designing and implementing database solutions. One such limitation is the maximum number of expressions that can be specified in the SELECT list of a query. This limit is set at 4096…
Generating Empty GUIDs
Understanding Sparse Columns
SQL Server 2022 enhances its JSON capabilities with the JSON_OBJECT() function, providing a streamlined approach to transforming SQL query results into JSON format directly within SQL queries. This functionality is invaluable for developers working in environments where SQL Server interacts with web services, applications, or systems that consume or produce…
There isn’t built-in support for working with hierarchies in the SQL Server except for the hierarchyid data type. This means that we should solve most of the hierarchical data processing tasks using the old-school portfolio of standard T-SQL language. One of these tasks is a simple conversion of hierarchical paths…
Generate Array of Values in FOR JSON
Practical Tally Table to WHILE Comparison (Generating Calendar) The “Tally table” is a well-known concept not only in the SQL Server world but in all set-based (relational) database engines. I don’t want to repeat some basic or go much deep into it. You can do it on your own starting…