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 - Location of Statistics Before and After Database is Marked as a Read-Only

SQL SERVER – Location of Statistics Before and After Database is Marked as a Read-Only

December 2, 2013
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Statistics

Where do old statistics go when a database becomes read-only? The location of statistics created before the change stays the same, and they remain permanent.

Read More
SQL SERVER - Statistics for Read-Only Database are in TempDB

SQL SERVER – Statistics for Read-Only Database are in TempDB

November 29, 2013
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Statistics

Statistics usually live in the same database as the table, so where do they go for a read-only database? The answer is TempDB. Here is how it works.

Read More
SQL SERVER - MySQL - Order Column by Nearest Value for Any Integer

SQL SERVER – MySQL – Order Column by Nearest Value for Any Integer

November 27, 2013
Pinal Dave
SQL Tips and Tricks
MySQL, SQL Order By, SQL Scripts

How do you order column values by how close they are to any integer, such as -5? Here is a script that works the same way on SQL Server and MySQL.

Read More
SQL SERVER - Export Data AS CSV from Database Using SQLCMD

SQL SERVER – Export Data AS CSV from Database Using SQLCMD

November 25, 2013
Pinal Dave
SQL Tips and Tricks
CSV, SQL Scripts, SQL Server

We often import CSV into SQL Server, but how do you export data as CSV with SQLCMD? Two simple commands, one with column headers and one without.

Read More
Backup settings for database restore.

SQL SERVER – FIX : Error 3154: The backup set holds a backup of a database other than the existing database – SSMS

November 23, 2013
Pinal Dave
SQL Tips and Tricks
SQL Backup and Restore, SQL Data Storage, SQL Error Messages, SQL Scripts

Error 3154 says the backup set holds a backup of a different database. Here is how to fix it in SSMS, plus the T-SQL RESTORE WITH REPLACE option.

Read More
Three pale ceramic bowls, two filled with blue and terracotta stones and one empty, beside two loose stones.

XQuery Comparisons: General Equality Is Not Singleton Equality

November 22, 2013
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL Server, SQL XML

XQuery Comparisons use different rules for general sequence operators and singleton value operators. I make equality and inequality visible side by side. A general unequal-pair result is not always the inverse of an equal-pair result.

Read More
MySQL - How to Write Loop in MySQL

MySQL – How to Write Loop in MySQL

November 12, 2013
Pinal Dave
SQL Tips and Tricks
MySQL, SQL Scripts

MySQL does not let you loop in ad-hoc SQL. Here is how to write a loop in MySQL with a simple stored procedure that uses LOOP, ITERATE and LEAVE.

Read More
Previous 1 … 181 182 183 184 185 186 187 … 366 Next
  • Books
  • Testimonials
  • Privacy Policy

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