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
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 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
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
SQL SERVER - Applying NOLOCK Hint at Query Level - NOLOCK for whole Transaction

SQL SERVER – Applying NOLOCK Hint at Query Level – NOLOCK for whole Transaction

April 17, 2011
Pinal Dave
SQL Tips and Tricks
SQL Scripts

Can you apply the NOLOCK hint to a whole query with OPTION (NOLOCK)? No, it fails with Msg 102. Here is how I use an isolation level instead.

Read More
Previous 1 … 233 234 235 236 237 238 239 … 365 Next
  • Books
  • Testimonials
  • Privacy Policy

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