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
Three open boxes of different sizes, each holding three dark balls, one ball in each box painted red.

CHAR, VARCHAR, NVARCHAR and VARCHAR(MAX) Quiz: How Many Bytes?

January 16, 2012
Pinal Dave
SQL Puzzle
SQL Column, SQL Datatype, SQL String, Unicode

This CHAR, VARCHAR, NVARCHAR and VARCHAR(MAX) Quiz stores the text abc in three columns and asks how many bytes each one uses. The answer is 10, 3 and 6. A tested script proves it and shows the trailing space trap, the question mark problem and the 8,000 byte limit.

Read More
Two nearly identical white teacups on saucers, one with a small mark on its rim.

Collation Sensitivity Quiz: Does ‘jose’ Match ‘José’?

January 7, 2012
Pinal Dave
SQL Puzzle
SQL Collation, SQL Error Messages, SQL String, Unicode

This Collation Sensitivity Quiz asks whether jose matches JOSE and José in a case-insensitive, accent-sensitive database. The answer is JOSE yes, José no. A tested script compares three collations and shows the width and kana settings too.

Read More
One brass key blank fits a precise profile jig while a similar blank with a different ridge rests outside

LIKE Character Ranges: [a-f], [^0-9] and Collation Traps

August 9, 2011
Pinal Dave
SQL Tips and Tricks
SQL Collation, SQL NULL, SQL String, Unicode

A bracket range sounds simple until the collation decides what sits between a and f. Test it once so a bad code never reaches your table.

Read More
A hand crushing the corners of an oversized parcel to force it into a street postbox slot.

Parameter Types From .NET: Stopping Implicit Conversions at the Source

June 16, 2011
Pinal Dave
SQL Performance
DotNet, Execution Plan, SQL Datatype, SQL Server, Unicode

Match parameter types from .NET to SQL Server columns, avoid implicit conversions, and inspect cached plans for mismatched strings.

Read More
Two identical glasses of water, one with a red drop sinking in it

Rows That Look Identical but Are Not: Finding Hidden Characters

April 1, 2011
Pinal Dave
SQL Tips and Tricks
SQL Collation, SQL Server, SQL String, Unicode

Expose hidden characters with DATALENGTH and UNICODE, clean known whitespace safely, and add a constraint to prevent recurrence.

Read More
Three leaf-pattern cloth samples mounted together in a wooden frame on a workshop bench.

Multi-Language Text: A Table Design for Translations

May 23, 2010
Pinal Dave
SQL Tips and Tricks
SQL Collation, SQL Table Operation, Unicode

Multi-language text separates product identity from translated names. This test setup checks requested, fallback, and base names, Unicode text, duplicate tags, missing rows, and a precise blank policy.

Read More
Previous 1 2 3
  • Books
  • Testimonials
  • Privacy Policy

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