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 large and a small copy of the same book on a library shelf, a hand sliding the small one back out.

Case-Insensitive Unique Constraints in a Case-Sensitive Database

September 25, 2023
Pinal Dave
SQL Tips and Tricks
Computed Column, SQL Collation, SQL Constraint and Keys, SQL Index, SQL Server

Enforce case-insensitive unique user names in a case-sensitive database using an indexed computed column with an explicit collation.

Read More
Gouache painting of pairs of large and small cups on a shelf with one small vermilion cup

Case-Sensitive WHERE Clause: COLLATE Without Losing the Seek

March 15, 2021
Pinal Dave
SQL Tips and Tricks
SQL Collation, SQL Scripts, SQL Search, SQL Server, SQL String

A case-sensitive WHERE clause needs a COLLATE on the comparison, but the obvious version scans the index. A demo measures 286 reads against 2, and shows two fixes: keep the plain test beside it, or give the column a case-sensitive collation.

Read More
database collation

Change Database and Table Collation – SQL in Sixty Seconds #145

December 8, 2020
Pinal Dave
SQL Video
SQL Collation, SQL in Sixty Seconds, SQL Server

I discussed the method to change the database and table collation with my client during the Comprehensive Database Performance Health Check.

Read More
A relined cabinet remains distinct from drawers that retain their earlier linings.

SQL SERVER – Change Database and Table Collation

December 1, 2020
Pinal Dave
SQL Tips and Tricks
SQL Collation, SQL Scripts, SQL Server

To Change Database collation, I separate its default from existing character-column settings. The customer moved from case-insensitive to case-sensitive behavior.

Read More
Similar oak leaves with different surface appearances share one sorting compartment

How to Do Case Insensitive Search? – Interview Question of the Week #267

March 8, 2020
Pinal Dave
SQL Interview Questions and Answers
SQL Collation, SQL Scripts, SQL Search, SQL Server

Question: How to Do Case Insensitive Search?

Collations in SQL Server provide sorting rules, case, and accent sensitivity properties for your data.

Read More
Gouache painting of felt cutouts of hearts, stars and suns on a table, with one heart vermilion

Smiley in SSMS: Show Emoji in Results and Database Names

February 28, 2020
Pinal Dave
SQL Tips and Tricks
SQL Collation, SQL Scripts, SQL Server Management Studio, Unicode

To show a smiley in SSMS, type the emoji inside an N-prefixed string and run the query. This post explains how SQL Server stores each emoji as two characters, why two different emoji can compare as equal, and how to find them in a column. It also shows what happens when an emoji is part of a database name.

Read More
Two pantry shelves, small tins boxed wastefully on one and packed snugly on the other.

UTF-8 Collations in SQL Server 2019: When They Save Space

November 4, 2019
Pinal Dave
SQL Tips and Tricks
SQL Collation, SQL Data Storage, SQL Server, SQL Server 2019, Unicode

Compare UTF-8 collations with NVARCHAR storage for English, European, and Asian text before converting indexes or clients.

Read More
1 2 3 4 … 7 Next
  • Books
  • Testimonials
  • Privacy Policy

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