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 pastry docker above equal pastry sheets turned in different directions

Does Column Order in CREATE TABLE Change How Rows Are Stored?

March 17, 2013
Pinal Dave
SQL Tips and Tricks
SQL Index, SQL Scripts, SQL Server

Someone wants to reorder columns to shrink rows. I measured it on SQL Server 2025, and the answer is mostly no, with one small exception worth knowing.

Read More
A candelabra with one red candle burned far lower than the others

Finding Which Database Uses the Most CPU on a Shared Instance

March 15, 2013
Pinal Dave
SQL Performance
SQL CPU, SQL DMV, SQL Performance, SQL Server

Find which database uses the most CPU from cached query stats and plan attributes, then use Query Store for restart-safe history.

Read More
Gouache painting of a xylophone with one new red bar fitted into the middle of the row

How to Add Column at Specific Position in SQL Server

March 11, 2013
Pinal Dave
SQL Tips and Tricks
SQL Column, SQL Scripts, SQL Server, SQL Server Management Studio

To add column at specific position in SQL Server, you have three tested options, because ALTER TABLE always adds the column last. This post shows a SELECT list, a view for loads and reports, and a full table rebuild. It also explains what the rebuild costs.

Read More
Glass lavender alembic feeding a small oil vial beside an intact rooted lavender plant

BACPAC or Backup: When an Export Is the Wrong Tool

March 10, 2013
Pinal Dave
SQL Tips and Tricks
SQL Backup and Restore, SQL Migration, SQL Server

A BACPAC export has rows in it, but it is not a recovery backup. Here is a small demo that shows the difference.

Read More
A lone hawthorn tree bent sideways by old winds on a calm day, a red gate below.

Finding Procedures Created With the Wrong SET Options

March 9, 2013
Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL Server, SQL Stored Procedure

Find procedures with wrong SET options in sys.sql_modules, understand error 1934, and recreate modules with ANSI_NULLS and QUOTED_IDENTIFIER ON.

Read More
SQL SERVER - Check If String is a Palindrome in Using T-SQL Script - Reverse Function

SQL SERVER – Check If String is a Palindrome in Using T-SQL Script – Reverse Function

March 7, 2013
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL Server, SQL String

A friend building a captcha had to skip words that read the same backward. Here is a T-SQL script with REVERSE to check if a string is a Palindrome.

Read More
Solder sucker beside a recovered original bead and a separate new lump

Rethrowing Errors With THROW and Keeping the Original Number

March 6, 2013
Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL Scripts, SQL Server

A bare THROW passes an error on untouched. A new THROW or a copied RAISERROR message does not. See the proof, plus one semicolon trap.

Read More
Previous 1 … 277 278 279 280 281 282 283 … 420 Next
  • Books
  • Testimonials
  • Privacy Policy

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