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
Statistics

SQL SERVER – Find Details for Statistics of Whole Database

June 29, 2011
Pinal Dave
SQL Performance
SQL DMV, SQL Scripts, SQL Server, SQL Statistics

Need statistics of whole database in one view? My script uses DMVs instead of the deprecated sp_helpstats and shows each stat, column and last update.

Read More
Two loose blue ceramic beads beside six woven pads holding differently colored beads and pebbles.

CROSS JOIN: Duplicate Inputs Multiply the Result

June 28, 2011
Pinal Dave
SQL Tips and Tricks
Best Practices, SQL Scripts, SQL Server

CROSS JOIN multiplies row counts, including repeated labels. Keep source identifiers and grouped pair counts visible while checking result grain.

Read More
Error dialog explaining why a query does not throw an error.

SQL SERVER – Puzzle Involving NULL – Resolve – Error – Operand data type void type is invalid for sum operator

June 27, 2011
Pinal Dave
SQL Puzzle
SQL NULL, SQL Operator, SQL Scripts, SQL Server

SELECT SUM over a lone NULL throws Msg 8117: Operand data type void type is invalid for sum operator. Here is why it happens and how ISNULL fixes it.

Read More
SQL SERVER - T-SQL Scripts to Find Maximum between Two Numbers

SQL SERVER – T-SQL Scripts to Find Maximum between Two Numbers

June 26, 2011
Pinal Dave
SQL Tips and Tricks
SQL Scripts

A SQL enthusiast at the airport asked for a simple way to find maximum between two numbers. Here is his clever ABS formula and my CASE version.

Read More
SQL SERVER - Selecting Domain from Email Address

SQL SERVER – Selecting Domain from Email Address

June 18, 2011
Pinal Dave
SQL Tips and Tricks
SQL Scripts

A quick T-SQL script to select the domain from email address values with RIGHT, LEN and CHARINDEX, and count how many emails share each domain.

Read More
SQL SERVER - Solution - Puzzle - Statistics are not Updated but are Created Once

SQL SERVER – Solution – Puzzle – Statistics are not Updated but are Created Once

June 17, 2011
Pinal Dave
SQL Puzzle
SQL Index, SQL Scripts, SQL Statistics

The solution to my puzzle on why statistics are not updated but are created once after a large insert, even with auto update on, and the fix that worked for me.

Read More
SQL SERVER - Solution - Puzzle - SELECT * vs SELECT COUNT(*)

SQL SERVER – Solution – Puzzle – SELECT * vs SELECT COUNT(*)

June 15, 2011
Pinal Dave
SQL Puzzle
SQL Scripts

The solution to my puzzle on why SELECT * throws an error but SELECT COUNT(*) does not, with the best reader answers and credit to Rob Farley.

Read More
Previous 1 … 229 230 231 232 233 234 235 … 365 Next
  • Books
  • Testimonials
  • Privacy Policy

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