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 - Common Table Expression (CTE) and Few Observation

SQL SERVER – Common Table Expression (CTE) and Few Observation

May 10, 2011
Pinal Dave
SQL Tips and Tricks
SQL Scripts

A few observations on Common Table Expression (CTE): it does not replace temp tables, begin it with a semicolon, and its scope is one statement.

Read More
Sch-S' lock type in a SQL Server execution plan.

SQL SERVER – What Kind of Lock WITH (NOLOCK) Hint Takes on Object?

May 8, 2011
Pinal Dave
SQL Tips and Tricks
SQL Scripts

What kind of lock does WITH (NOLOCK) take? Vinod Kumar made me think again: it takes a schema lock, and a quick query on sys.dm_tran_locks proves it.

Read More
Generate Scripts.

SQL SERVER – 2008 – 2008 R2 – Create Script to Copy Database Schema and All The Objects – Data, Schema, Stored Procedure, Functions, Triggers, Tables, Views, Constraints and All Other Database Objects

May 7, 2011
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Utility

Use the SQL Server script generator wizard to copy database schema, data and all objects, then run the large script with SQLCMD on the new instance.

Read More
A row of mugs on kitchen hooks, one mug per hook, except one hook holding two mugs together.

ROWS vs RANGE in Window Frames: Why Running Totals Differ

May 4, 2011
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Order By, SQL Scripts, SQL Server

Compare ROWS vs RANGE for running totals, handle tied sort values, write explicit frames, and check worktable reads on your server.

Read More
Gouache painting: in a sports room, two identical pegged racks hold the same four team bibs in cream, blue, sage and red

XML sql:column: Compare XML With a Relational Value

May 3, 2011
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL Server

XML sql:column passes a typed relational value into XQuery. Keep node existence separate from a missing document and a scalar Boolean.

Read More
Execution Plan for SQL Query.

SQL SERVER – Performance Improvement with of Executing Stored Procedure with Result Sets in SQL Server 2012

May 2, 2011
Pinal Dave
SQL Tips and Tricks
SQL Scripts

How fast are result sets in SQL Server 2012 compared with a temp table? I ran both methods and compared their execution plans to answer a reader.

Read More
A table top used as a template, traced in pencil onto a fresh sheet of plywood on trestles.

SQL SERVER – CTAS – Create Table As SELECT – What is CTAS?

April 30, 2011
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Server, SQL Table Operation

CTAS stands for Create Table As Select. In SQL Server you do it with SELECT INTO, which creates the new table and fills it with data in one step.

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

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