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
A corridor of wooden gym lockers with small brass number plates, receding into soft light.

MySQL – Generating Row Number for Each Row Using Variable

March 8, 2014
Pinal Dave
SQL Tips and Tricks
MySQL, Ranking Functions, SQL Scripts

MySQL has no ROW_NUMBER() function like SQL Server. Here are two methods for generating row number values for each row with a variable in a SELECT statement.

Read More
A split pomegranate on a garden table, a hand lifting out one chamber full of red seeds

Querying Nested JSON Arrays With OPENJSON

February 19, 2014
Pinal Dave
SQL Tips and Tricks
JSON, SQL Function, SQL Scripts, SQL Server

Query nested JSON arrays with OPENJSON, preserve element positions, pass inner arrays with AS JSON, and handle missing or strict paths.

Read More
SQL Puzzle - A Quick Fun with Bit Wise Operator - Part 2

SQL Puzzle – A Quick Fun with Bit Wise Operator – Part 2

February 8, 2014
Pinal Dave
SQL Tips and Tricks
SQL Scripts

Part 2 of my quick fun with Bit Wise Operator puzzle uses OR. Why does SELECT 1 | 100 return 101? Leave your answer in the comments.

Read More
9 Things You Should be Doing with Your Backups - Backup Tips - SQL Server Backup Tips

9 Things You Should be Doing with Your Backups – Backup Tips – SQL Server Backup Tips

February 3, 2014
Pinal Dave
SQL Tips and Tricks
SQL Backup and Restore, SQL Scripts, SQL Server

Nine SQL Server Backup tips every DBA should follow, starting with the simplest one: never keep backups on the same physical drive as the database files.

Read More
A hand pressing a crossing button again, its small red wait lamp already glowing, a bicycle at the curb

Idempotent Deployment Scripts: Safe to Run Twice

January 31, 2014
Pinal Dave
SQL Tips and Tricks
Best Practices, DevOps, SQL Scripts, SQL Server, SQL Transactions

Build idempotent deployment scripts with guarded schema changes, versioned data fixes, and repeat-run checks for the intended state.

Read More
Two pearl strands side by side on velvet, matched bead for bead, one pearl in the second strand a warmer shade.

Comparing Data Between Two Tables

January 29, 2014
Pinal Dave
SQL Tips and Tricks
Duplicate Records, SQL Joins, SQL NULL, SQL Scripts, SQL Server

Comparing data between two tables uses EXCEPT, full joins, and hashes, with explicit NULL and duplicate rules for trustworthy results.

Read More
SQL SERVER - Rename a Table Name Containing [ or ] in the Name - Identifier in the Table Name

SQL SERVER – Rename a Table Name Containing [ or ] in the Name – Identifier in the Table Name

January 25, 2014
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Server Management Studio

My colleague renamed a table to [] by accident and sp_rename failed. Here is how to rename a table name containing [ or ] characters.

Read More
Previous 1 … 177 178 179 180 181 182 183 … 363 Next
  • Books
  • Testimonials
  • Privacy Policy

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