In this third in a series on working smarter with T-SQL, let's give the built-in sp_executesql stored proc a go. In my previous posts, I've described some methods for generating and executing T-SQL ...
Building on the DATETIMEFROMPARTS, DATETIME2FROMPARTS offers similar functionality, but yields more precise DateTime2 data type, containing fractions of a second to a specified precision. Naturally, ...
Working with dynamic SQL is all well and good, but avoid the risks that can lead to your code being susceptible to a SQL injection attack. As much as making your T-SQL work smarter for you, a la ...
PolyBase, a data virtualization feature for SQL Server, allows users to seamlessly query data from various external sources directly using T-SQL (Transact-SQL) without the need for separate client ...
SQL, the Structured Query Language, remains one of the most widely used programming languages, coming in fourth in Stack Overflow’s research for 2023. Just over half (51.52%) of professional ...
this will return: "(1 row(s) affected)" But now I need to know, what data was actually inserted? SQL Server has answered this question in 2005 with the OUTPUT statement: This will return a dataset ...
The basic concept of recursion is straightforward: a given chunk of code calls itself until some boundary condition is reached. Arthur Fuller demonstrates how to use recursion in T-SQL. TechRepublic’s ...
At Microsoft's Ignite digital event this week, the company is announcing the private preview of SQL Server 2022, the next version of its three-decades-old relational database management system (RDBMS) ...