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
One blank cream reference card beside a plain pencil and small paper clip on a wooden desk.

A One Page Reference for Everyday SQL Server Work

June 25, 2008
Pinal Dave
SQL Tips and Tricks
Best Practices, Database, SQL Scripts, SQL Server

Build a practical SQL Server reference around everyday questions, with compact queries for context, objects, requests, space, and transactions.

Read More
SQL SERVER - Create Check Constraint on Column

SQL SERVER – Create Check Constraint on Column

June 22, 2008
Pinal Dave
SQL Tips and Tricks
SQL Constraint and Keys, SQL Error Messages, SQL Scripts

A junior developer wrote a trigger to block invalid data. A Check Constraint is simpler. My example limits PostalCode length in AdventureWorks and tests it.

Read More
SQL Server query for SQL Server2.

SQL SERVER – Find Current Identity of Table

June 20, 2008
Pinal Dave
SQL Tips and Tricks
SQL Index, SQL Scripts, SQL Server DBCC

Many developers use MAX() to find the current identity of a table. I prefer DBCC CHECKIDENT, which reports the current identity value directly.

Read More
Two plain wooden toolboxes of different sizes resting side by side on a neutral workbench.

Comparing Two Databases Without a Scoreboard

June 19, 2008
Pinal Dave
SQL Tips and Tricks
Best Practices, Database, SQL Scripts, SQL Server

Learn how to compare databases using representative work, operational skills, recovery requirements, and costs rather than feature-count scoreboards.

Read More
Two blue thread spools and one ochre spool stand on a metal support above folded cream fabric.

Weighted Average: Keep Group Totals and Value Counts

June 18, 2008
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Reports, SQL Scripts, SQL Server

A weighted average preserves each group’s contribution. I compare unequal groups before combining their means. Group totals and populated-value counts reconstruct the underlying average without treating missing readings as zero.

Read More
SQL SERVER - 2008 - SQL Server Start Time

SQL SERVER – 2008 – SQL Server Start Time

June 17, 2008
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Scripts

SQL Server 2008 records when it started in sys.dm_os_sys_info. One SELECT of sqlserver_start_time gives you the SQL Server start time. It does not work on 2005.

Read More
SQL SERVER - Introduction to SERVERPROPERTY and example

SQL SERVER – Introduction to SERVERPROPERTY and example

June 16, 2008
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts

SERVERPROPERTY is a handy system function that returns server values like collation, edition and instance name. My script lists every property in one result.

Read More
Previous 1 … 311 312 313 314 315 316 317 … 365 Next
  • Books
  • Testimonials
  • Privacy Policy

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