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
An open pea pod with five peas and an empty stretch at the end beside a red bowl.

LEN vs DATALENGTH: Trailing Spaces, Unicode Bytes and NULL

June 22, 2013
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Function, SQL Server, SQL String, Unicode

Compare LEN vs DATALENGTH for trailing spaces, Unicode, UTF-8, NULL, and MAX values before safely resizing SQL Server string columns.

Read More
Two hands holding a daisy chain of joined flowers, a single loose daisy on the grass beside them

Storing Emoji and Short Messages: nvarchar, UTF-8 and Length

April 9, 2012
Pinal Dave
SQL Tips and Tricks
SQL Collation, SQL Datatype, SQL Server, SQL String, Unicode

Store emoji safely with nvarchar or UTF-8 varchar, compare LEN and DATALENGTH, and choose message limits that fit full Unicode.

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
Previous 1 2
  • Books
  • Testimonials
  • Privacy Policy

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