T-SQL Programming Aaron Bertrand in T-SQL Programming Strategies for queries against bit columns Recently someone posted a question where they couldn’t quite figure out how to construct a predicate based on a bit... 20 November 2023 7 min read
Database Administration Aaron Bertrand in Database Administration Moving SQL Server To The Cloud: Modernizing Stack Overflow for Teams Earlier this year, we migrated the entire Stack Overflow for Teams platform to Azure. This was a lengthy endeavour and... 06 November 2023 11 min read
BI Dennes Torres in BI SQL Endpoints and Lakehouse UI Differences and Access Secrets There are some differences and secrets between the UI of a SQL Endpoint and the UI of a Lakehouse. I... 30 October 2023 7 min read
T-SQL Programming Edward Pollack in T-SQL Programming Export & Import Data in SQL Server: CSV, Parquet & PowerShell Export and import data in SQL Server using PowerShell and OPENROWSET. Step-by-step guide for CSV files, parquet format, BCP, SQL... 23 October 2023 23 min read
T-SQL Programming Aaron Bertrand in T-SQL Programming Don’t Use DISTINCT as a SQL Join Fixer – Use EXISTS Instead Using DISTINCT to fix duplicate rows from a SQL join is a common antipattern. It generates all the duplicates first,... 16 October 2023 6 min read
Ben Johnston in SQL Server SQL Server Security Features: Complete Guide Complete guide to SQL Server security features - TDE, Always Encrypted, Dynamic Data Masking, Row-Level Security, auditing, firewall rules, and... 15 October 2023 38 min read
Performance Aaron Bertrand in Performance Normalize strings to optimize space and searches While this article is specifically geared to SQL Server, the concepts apply to any relational database platform. The Stack Exchange... 02 October 2023 9 min read
T-SQL Programming Itzik Ben-Gan in T-SQL Programming T-SQL Fundamentals: Controlling Duplicates When people start learning a new field, for example T-SQL, it’s tempting to spend very little time trying to understand... 28 September 2023 20 min read
Database Administration Adrien Muhlemann in Database Administration Analyze and Tune SQL Server Statistics Over the years, SQL Server Statistics have been discussed in countless blog posts, articles, and presentations, and I believe that... 22 September 2023 34 min read
T-SQL Programming Drupal Grupal in T-SQL Programming Alternatives To SQL Server 2022 Built-in function GREATEST If you haven’t already heard, SQL Server 2022 introduced a new built-in system function called GREATEST. Simply put, it is... 18 September 2023 14 min read
Blogs Louis Davidson in Blogs Yet Another Reason to Not Use sp_ in SQL Server Object Names In 2012, Aaron Bertrand said most everything I knew (and a bit more) about the issues with using the sp_... 25 August 2023 6 min read
T-SQL Programming Aaron Bertrand in T-SQL Programming Working around schema drift in SQL Server At Stack Overflow, our environment has multiple implementations of a largely – but not 100% – identical schema. (By “schema,”... 14 August 2023 10 min read
Blogs Ben Johnston in Blogs SQL Server Row Level Security Deep Dive. Part 1 – Introduction and Use Cases My initial goal of documenting and exploring SQL Server Row Level Security (RLS) was to show the basic functionality and... 01 August 2023 17 min read
Database Administration Edward Pollack in Database Administration Run T-SQL Across Multiple SQL Server Databases: A Reusable Solution Run T-SQL across multiple SQL Server databases reliably - without sp_MSforeachdb. Build a reusable solution with database filters, object presence... 31 July 2023 15 min read
SQL Server Ben Johnston in SQL Server Unmasking SQL Server Dynamic Data Masking, Part 5: Mitigations and Summary This is the fifth and final part of this series on SQL Server Dynamic Data Masking. In this article, I’ll... 30 July 2023 12 min read
SQL Server Ben Johnston in SQL Server Unmasking SQL Server Dynamic Data Masking, Part 4, Unmasking Formatted and Unformatted Text Continuing from the previous entry in this series on security concerns with using Dynamic Data Masking, in this article I... 27 June 2023 30 min read
T-SQL Programming Greg Larsen in T-SQL Programming SQL Subquery in SELECT: Examples & Syntax Guide Learn how to use subqueries in SQL SELECT statements with practical examples. Covers basic subqueries, correlated subqueries, EXISTS, IN, and... 26 June 2023 15 min read
SQL Server Ben Johnston in SQL Server SQL Server DDM Security Risks: Side Channel Attacks and Partial Unmasking SQL Server Dynamic Data Masking can be bypassed: learn how side channel attacks use range queries to infer masked values,... 14 June 2023 31 min read
SQL Server Ben Johnston in SQL Server SQL Server Dynamic Data Masking Setup Guide Set up SQL Server Dynamic Data Masking step by step. Covers ALTER TABLE masking syntax, mask functions (default, email, random,... 07 June 2023 28 min read
Performance Dennes Torres in Performance SQL Server 2022: Capture SQL Anti-Patterns One of the new Extended Event available in SQL Server 2022 is the query_antipattern. This extended event allows to... 01 June 2023 6 min read