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 - Simple Puzzle with UNION

SQL SERVER – Simple Puzzle with UNION

September 5, 2013
Pinal Dave
SQL Puzzle
SQL Scripts, SQL Union clause

Try this simple puzzle with UNION and ORDER BY. Guess what each of the three queries returns, and see why one of them fails with Msg 108 and Msg 104.

Read More
A latch hook beside overlapping yarn loops and a short final loop

Overlapping Chunks: Splitting Long Text With GENERATE_SERIES

September 4, 2013
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Server, SQL String

Split long text into overlapping pieces with one short query. Plus the quiet traps: NULL text, a step that is too big, and chopped words.

Read More
A platform luggage cart of suitcases each carrying a huge wooden tag, except one with a small vermilion tag.

Narrow Index Keys: Why the Clustered Key Width Matters Everywhere

September 3, 2013
Pinal Dave
SQL Performance
Clustered Index, Primary Key, SQL Index, SQL Server

Evaluate narrow index keys by comparing clustered GUID and integer designs, measuring index pages, and preserving natural uniqueness.

Read More
The back door of a small bakery with an oiled deadbolt, a fire blanket, a spare key on a hook and a broom.

Database Security Basics for a Small Business

September 2, 2013
Pinal Dave
SQL Tips and Tricks
Best Practices, DBA, SQL Backup and Restore, SQL Server Security

Database security basics for a small business cover patching, off-site backups, strong logins, limited access, and encryption that works.

Read More
A new wooden shelf unit standing on a workshop floor beside a small dish of wooden pegs, one red peg nearby.

Designing Your First Table: Columns, Keys and Data Types

September 1, 2013
Pinal Dave
SQL Tips and Tricks
Primary Key, SQL Column, SQL Constraint and Keys, SQL Datatype, SQL Table Operation

Designing Your First Table gets easier when you decide what it must hold before you write any SQL. This post walks through naming, data types, NULL or NOT NULL, a primary key, a default and a check constraint on a small Customers table. It also shows what to leave for later.

Read More
A donkey with full panniers and a red blanket walking a mountain path.

Table-Valued Parameters: Sending Thousands of Rows in One Call

August 31, 2013
Pinal Dave
SQL Tips and Tricks
DotNet, SQL Scripts, SQL Server, SQL Stored Procedure

Send thousands of rows in one call with table-valued parameters, compare round trips, and handle missing column statistics accurately.

Read More
A glass display case in a quiet gallery holding three old ceramic jars on a red base.

Read-Only Filegroups: Locking Away Old Data

August 30, 2013
Pinal Dave
SQL Tips and Tricks
Database, SQL Backup and Restore, SQL Data Storage, SQL Scripts

Read-only filegroups let you lock old data so nothing can change it by accident. This post moves old rows to their own filegroup, makes it read-only, shows what still works and what fails, and explains how partial backups skip the locked data.

Read More
Previous 1 … 468 469 470 471 472 473 474 … 844 Next
  • Books
  • Testimonials
  • Privacy Policy

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