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 - Observation of Top with Index and Order of Resultset

SQL SERVER – Observation of Top with Index and Order of Resultset

July 23, 2012
Pinal Dave
SQL Tips and Tricks
SQL Index

Adding an index can change which rows TOP returns when there is no ORDER BY. I share three real cases where the order of resultset was blamed on the wrong thing.

Read More
A hand hanging pruning shears on a shed pegboard where each tool has a painted outline behind it

Keeping Database Documentation Next to the Code

July 22, 2012
Pinal Dave
SQL Tips and Tricks
Best Practices, DBA, SQL Documentation, SQL Server

Keep database documentation close to SQL Server objects with extended properties, durable module comments, and catalog-generated reports.

Read More
A narrow fabric tape stretches between two fixed clips with cloth extending outside both ends

Time-Limited Access: Expiring Grants With a Valid-Until Column

July 21, 2012
Pinal Dave
SQL Tips and Tricks
SQL Constraint and Keys, SQL DateTime, SQL Server Security, SQL View

A ValidUntil column does nothing by itself. Here is how to make the read path enforce it, with a demo you can run.

Read More
SQL Server column information.

SQL SERVER – INFORMATION_SCHEMA.COLUMNS and Value Character Maximum Length -1

July 20, 2012
Pinal Dave
SQL Tips and Tricks
SQL System Table

Why does INFORMATION_SCHEMA.COLUMNS show -1 as the character maximum length? A reader asked me this simple question, and I explain what the negative value means.

Read More
SQL SERVER - Find Column Used in Stored Procedure - Search Stored Procedure for Column Name - Part 2

SQL SERVER – Find Column Used in Stored Procedure – Search Stored Procedure for Column Name – Part 2

July 19, 2012
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Server, SQL Stored Procedure

Readers improved my script to find column used in stored procedure. Imran Mohammed shares newer scripts to search stored procedure for column name.

Read More
Gouache painting of a miniature wooden workshop being assembled from organized parts beside an illustrated instruction book.

Generate Script for Schema and Data in SQL Server: SQL in Sixty Seconds #021

July 18, 2012
Pinal Dave
SQL Video
SQL Identity, SQL in Sixty Seconds, SQL Scripts, SQL Server Management Studio

To generate script for schema and data, choose Schema and data in the SSMS wizard and review the result before you run it. The tests here build such a script with T-SQL on SQL Server 2025 and show three ways it breaks: identity columns, apostrophes and the 1,000 row limit.

Read More
A bicycle pedal is detached beside the bicycle while its chain and other connected parts remain visible

Decommissioning a Database: A Safe Checklist Before the Drop

July 17, 2012
Pinal Dave
SQL Tips and Tricks
DBA, SQL Backup and Restore, SQL Dependency, SQL Monitoring

Dropping an old database is a one-way door. Here is the short checklist I run first, with a demo you can paste into SSMS.

Read More
Previous 1 … 528 529 530 531 532 533 534 … 844 Next
  • Books
  • Testimonials
  • Privacy Policy

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