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
Mar11

How to Add Column at Specific Position in SQL Server

Pinal Dave
SQL Tips and Tricks
SQL Column, SQL Scripts, SQL Server, SQL Server Management Studio
93 Comments

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.

Continue Reading
Mar10

BACPAC or Backup: When an Export Is the Wrong Tool

Pinal Dave
SQL Tips and Tricks
SQL Backup and Restore, SQL Migration, SQL Server
No Comments

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

Continue Reading
Mar9

Finding Procedures Created With the Wrong SET Options

Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL Server, SQL Stored Procedure
No Comments

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

Continue Reading
Mar8

SQL SERVER – Tricky Question – What is the Default Size of the Database

Pinal Dave
SQL Interview Questions and Answers
5 Comments

What is the default size of the database in SQL Server? Many guess 3 MB or 4 MB, but the real answer depends on the model system database.

Continue Reading
Mar7

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

Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL Server, SQL String
13 Comments

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.

Continue Reading
Mar6

Rethrowing Errors With THROW and Keeping the Original Number

Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL Scripts, SQL Server
No Comments

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.

Continue Reading
Mar5

SQL SERVER – Exporting Query Results to CSV using SQLCMD

Pinal Dave
SQL Tips and Tricks
sqlcmd
22 Comments

A reader on Facebook asked how to export query results to CSV using SQLCMD. It is a very simple command, and I show it with an AdventureWorks2012 example.

Continue Reading
Previous 1 … 497 498 499 500 501 502 503 … 847 Next

SQL Server slow? Let's fix it together in about four hours.

Pinal Dave

In my Comprehensive Database Performance Health Check, you share your screen, I guide you, and we fix your biggest performance troublemakers. No passwords. No remote access.

You keep every script, and the know-how to fix it yourself next time.

Want your whole team to learn it?

My Practical Workshop has no PowerPoint, just live demos. My AI Enablement Workshop shows your team where AI saves hours, and where it quietly costs them.

Over 400 customers have worked with me this way, and not one shared a password. See all consulting options.


Who We Are

Pinal Dave is an SQL Server Performance Tuning Expert and independent consultant with over 24 years of hands-on experience. He holds a Masters of Science degree and numerous database certifications.

Pinal has authored 19 books and 125 Pluralsight courses. To freely share his knowledge and help others build their expertise, Pinal has also written more than 5,800 database tech articles on his blog at https://blog.sqlauthority.com.

Pinal is also a CrossFit Level 1 Trainer (CF-L1) and CrossFit Level 2 Trainer (CF-L2).


Nupur Dave is a social media enthusiast and an independent consultant. She primarily focuses on the database domain, helping clients build short and long-term multi-channel campaigns to drive leads for their sales pipeline.


Shaivi Pinalkumar Dave is a book author and a women’s artistic gymnast.

  • Books
  • Testimonials
  • Privacy Policy

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