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
A hand raising a single vermilion pennant on a flagpole above a harbor full of moored boats.

Adding a NOT NULL Column With a Default to a Big Table

May 1, 2013
Pinal Dave
SQL Tips and Tricks
DBA, SQL Column, SQL Constraint and Keys, SQL Server, SQL Table Operation

Add a NOT NULL column with a default safely, distinguish metadata changes from row updates, and plan a staged Standard edition rollout.

Read More
SQL SERVER - UPDATE From SELECT Statement - Using JOIN in UPDATE Statement - Multiple Tables in Update Statement

SQL SERVER – UPDATE From SELECT Statement – Using JOIN in UPDATE Statement – Multiple Tables in Update Statement

April 30, 2013
Pinal Dave
SQL Tips and Tricks
SQL Joins

A developer wrote a cursor because he did not know how to UPDATE from SELECT. I show how to use JOIN and multiple tables in an UPDATE statement.

Read More
SQL SERVER - Disable All the Foreign Key Constraint in Database - Enable All the Foreign Key Constraint in Database

SQL SERVER – Disable All the Foreign Key Constraint in Database – Enable All the Foreign Key Constraint in Database

April 29, 2013
Pinal Dave
SQL Tips and Tricks
SQL Constraint and Keys

A tester wanted to load bad data, but foreign keys got in the way. Here is how to disable all the foreign key constraints in a database and enable them again.

Read More
A duvet shrinking flat inside a vacuum storage bag

Reducing the Size of a Reporting Database

April 28, 2013
Pinal Dave
SQL Tips and Tricks
Compression, Data Warehousing, DBA, Shrinking Database, SQL Data Storage

Reducing the size of a reporting database starts with compression, archiving, and index review; shrinking files comes last.

Read More
A lazy susan with seven colored bowls, including a red one, around a ring.

Weekday Logic That Works Under Any DATEFIRST Setting

April 27, 2013
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Scripts, SQL Server

Make weekday logic independent of DATEFIRST with a normalized offset or a known Monday, then test every date in a full year.

Read More
Gouache painting of two crates of pears, one holding duplicates with a red pear and one holding only single pears

UNION vs UNION ALL in SQL Server: What Each One Does

April 26, 2013
Pinal Dave
SQL Tips and Tricks
SQL Distinct, SQL Scripts, SQL Server, SQL Union clause

UNION vs UNION ALL comes down to duplicates: UNION removes them and UNION ALL keeps every row. This post tests both on two small store tables. It also covers sorting, a total row at the bottom, mixed operators and data type rules.

Read More
Execution plan with SQL query and cost estimates.

SQL SERVER – Return Specific Row to at the Bottom of the Resultset – T-SQL Script – Part 2

April 25, 2013
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Union clause

Part 2 on how to return a specific row at the bottom of the resultset. Earlier I used CASE in ORDER BY, and this time I show the UNION ALL method.

Read More
One chapter lifted from a stack of printed pages, a ribbon marking its place

SQL SERVER – Interview Questions and Answers Sample Chapter Free Download – SQL in Sixty Seconds #050

April 24, 2013
Pinal Dave
SQL Interview Questions and Answers
Database, SQL in Sixty Seconds, SQL Scripts, sqlcmd

SQL in Sixty Seconds hits its 50th episode and a full hour of play time. To celebrate, get a free SQL Server Interview Questions and Answers sample chapter.

Read More
SQL SERVER - Return Specific Row to at the Bottom of the Resultset - T-SQL Script

SQL SERVER – Return Specific Row to at the Bottom of the Resultset – T-SQL Script

April 23, 2013
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Server

How do I return a few chosen rows at the bottom of the entire resultset, in my own order? A T-SQL script on AdventureWorks shows how to do it.

Read More
An overflowing toy box beside a larger empty toy chest and a few small crates in a child's room.

Scale Up or Scale Out: Signs Your Server Needs More Hardware

April 22, 2013
Pinal Dave
SQL Performance
DBA, Hardware, SQL CPU, SQL Memory, SQL Wait Stats

Decide when to scale up SQL Server by checking sustained CPU demand, memory pressure, storage latency, and whether query tuning comes first.

Read More
Previous 1 … 342 343 344 345 346 347 348 … 593 Next
  • Books
  • Testimonials
  • Privacy Policy

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