This month's discount Comprehensive Database Performance Health Check · Testimonials
SQLAuthority with Pinal Dave
Home
  • Consulting
    • Health Check
  • Free Videos
  • All Articles
    • AI
    • SQL Performance
    • SQL Tips and Tricks
    • Interview Questions and Answers
    • SQL Puzzle
    • SQL Video
    • SQLAuthority News
    • Personal
  • Books
  • Consulting
Hands sorting loose screws and nuts into a muffin tin, one cup empty and one bent screw set apart

Turning Key-Value Pairs Into Columns for Reporting

September 19, 2013
Pinal Dave
SQL Tips and Tricks
PIVOT and UNPIVOT, SQL Reports, SQL Scripts, SQL Server

Turn key-value pairs into reporting columns with conditional aggregation and PIVOT, handle missing values and conversions.

Read More
SQL SERVER - Simple Puzzle with UNION - Part 5

SQL SERVER – Simple Puzzle with UNION Part 5

September 11, 2013
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Union clause

In Puzzle with UNION Part 5, the final part, two almost identical queries return the same answer, yet their execution plans are very different. Why?

Read More
SQL SERVER - Simple Puzzle with UNION

SQL SERVER – Simple Puzzle with UNION

September 5, 2013
Pinal Dave
SQL Puzzle
SQL Scripts, SQL Union clause

Try this simple puzzle with UNION and ORDER BY. Guess what each of the three queries returns, and see why one of them fails with Msg 108 and Msg 104.

Read More
A donkey with full panniers and a red blanket walking a mountain path.

Table-Valued Parameters: Sending Thousands of Rows in One Call

August 31, 2013
Pinal Dave
SQL Tips and Tricks
DotNet, SQL Scripts, SQL Server, SQL Stored Procedure

Send thousands of rows in one call with table-valued parameters, compare round trips, and handle missing column statistics accurately.

Read More
A glass display case in a quiet gallery holding three old ceramic jars on a red base.

Read-Only Filegroups: Locking Away Old Data

August 30, 2013
Pinal Dave
SQL Tips and Tricks
Database, SQL Backup and Restore, SQL Data Storage, SQL Scripts

Read-only filegroups let you lock old data so nothing can change it by accident. This post moves old rows to their own filegroup, makes it read-only, shows what still works and what fails, and explains how partial backups skip the locked data.

Read More
A row of wooden coat hooks on a wall, each holding a ring of keys, a few rings with small red tags.

Database Roles: Give Permissions to Groups, Not People

August 28, 2013
Pinal Dave
SQL Tips and Tricks
Database, SQL Scripts, SQL Server Security

Database roles let you grant permissions to a group once, then add and remove members as jobs change. This post covers the fixed roles and the risk of db_owner, shows how to create a custom role, and checks role membership and permissions with queries.

Read More
An open book on a pale table with a pressed leaf resting across its pages.

Script Table As in SSMS: CREATE, INSERT and SELECT in One Click

August 27, 2013
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Server Management Studio, SQL Table Operation, Starting SQL

Script Table As is the right-click menu in SSMS that writes CREATE, SELECT, INSERT, UPDATE and DELETE statements for a table. This post shows what each option writes, what the scripts leave out, and how to run them safely.

Read More
Previous 1 … 183 184 185 186 187 188 189 … 366 Next
  • Books
  • Testimonials
  • Privacy Policy

© 2006 – 2026 All rights reserved. pinal @ SQLAuthority.com