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 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
SQL SERVER - 2008 - Inline Variable Assignment

SQL SERVER – 2008 – Inline Variable Assignment

June 15, 2008
Pinal Dave
SQL Performance
SQL Scripts

SQL Server 2008 adds inline variable assignment, so DECLARE @MyVar INT = 5 works in one line. I compare it with the SQL Server 2005 way of DECLARE then SET.

Read More
SQLAuthority News - 600 Article and Over 3 Million Readers

SQLAuthority News – 600 Article and Over 3 Million Readers

June 14, 2008
Pinal Dave
SQLAuthority News
Database, DBA

Today is the 600th article on this blog, and over 3 Million readers have visited so far. Thank you. Send me your ideas, and see my favorite and best articles.

Read More
Previous 1 … 752 753 754 755 756 757 758 … 841 Next
  • Books
  • Testimonials
  • Privacy Policy

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