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
SQL SERVER - 2012 - Executing Stored Procedure with Result Sets

SQL SERVER – 2012 – Executing Stored Procedure with Result Sets

April 28, 2011
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Stored Procedure

Denali lets you execute a stored procedure with result sets and rename its columns at run time, with no temp table needed. Here is a quick script.

Read More
Two similar cream ceramic vases stand in separate wooden compartments beside a small sage-green jar.

XQuery Node Identity: Equal Text Can Be Different Nodes

April 27, 2011
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Function, SQL Scripts

XQuery node identity compares source nodes, not their text. Use is beside text equality to distinguish repeated values from the same node.

Read More
Dairy cows walking home along a farm lane at dusk, one cow lagging far behind at a bend.

Finding the Slowest Stored Procedures With sys.dm_exec_procedure_stats

April 26, 2011
Pinal Dave
SQL Performance
SQL DMV, SQL Performance, SQL Server, SQL Stored Procedure

Find the slowest stored procedures with cache statistics, compare CPU and reads, and use two snapshots to isolate one busy hour.

Read More
SQLAuthority News - 1700th Blog Posts - Over 25 Millions of Views - A SQL Milestone

SQLAuthority News – 1700th Blog Posts – Over 25 Millions of Views – A SQL Milestone

April 25, 2011
Pinal Dave
Personal
Database

My 1700th blog post is a milestone with over 25 million views. I look back at 2011 so far, from my wait types series to my SQL Server Quiz question.

Read More
SQL SERVER - How to ALTER CONSTRAINT

SQL SERVER – How to ALTER CONSTRAINT

April 24, 2011
Pinal Dave
SQL Tips and Tricks
SQL Constraint and Keys, SQL Scripts

Can you ALTER CONSTRAINT in SQL Server? No. The only way to change a constraint is to drop it and create it again, and here is the script for that.

Read More
Three distinct stamps match three clay impressions beside a separate blank fallback tile.

SQL SERVER – How to Use Decode in SQL Server?

April 23, 2011
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL Server

CASE expresses the DECODE mapping in this SQL Server example. I keep the named matches and default value explicit.

Read More
SQL SERVER - Potential Bottlenecks for Performance

SQL SERVER – Potential Bottlenecks for Performance

April 22, 2011
Pinal Dave
SQL Tips and Tricks

At GIDS I was asked to name potential bottlenecks for performance. My old college list still holds: CPU, RAM, hard disk, network and application code.

Read More
SQL server error message dialog.

SQL SERVER – Prevent Constraint to Allow NULL

April 21, 2011
Pinal Dave
SQL Tips and Tricks
SQL Constraint and Keys, SQL Scripts

Why does a CHECK constraint allow NULL? A reader thought it was a bug. I show why it happens and how to write the constraint so NULL is rejected too.

Read More
A jigsaw puzzle with pieces sorted into groups before being fitted together

Common Table Expressions for Readability

April 20, 2011
Pinal Dave
SQL Tips and Tricks
CTE, SQL Coding Standards, SQL Server, Temp Table

Common table expressions for readability name query steps and support recursion, but they do not promise cached intermediate results.

Read More
Two overlapping pale ceramic tiles beside a terracotta slab and blue and sage stones.

geometry STDistance: Measure the Closest Points of Two Shapes

April 19, 2011
Pinal Dave
SQL Tips and Tricks
Spatial Database, SQL Function, SQL Scripts, SQL Server

geometry STDistance measures the shortest distance between points belonging to two represented shapes. I compare an interior gap with an endpoint gap. Intersecting shapes provide a useful zero-distance case.

Read More
Previous 1 … 420 421 422 423 424 425 426 … 593 Next
  • Books
  • Testimonials
  • Privacy Policy

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