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
escape quotes

SQL SERVER – Escape Single Quotes

November 22, 2023
Pinal Dave
SQL Tips and Tricks
Quotes

In this post, I’ll cover a few methods you can use to escape single quotes properly in SQL Server. The most popular is double single quotes.

Read More
Gouache painting of a windowsill of cacti with the tallest one wearing a vermilion cork cap

Escape Text for JSON: Build Valid JSON With STRING_ESCAPE

February 16, 2021
Pinal Dave
SQL Tips and Tricks
JSON, Quotes, SQL Scripts, SQL Server, SQL String

To escape text for JSON, pass each value through STRING_ESCAPE, so JSON built by hand stays valid. A demo shows which characters it escapes and which it leaves alone. It also shows when JSON_MODIFY and FOR JSON make it unnecessary.

Read More
Two matching brass clips hold a ribbon safely inside a wooden frame

How to Escape a Single Quote in SQL Server? – Interview Question of the Week #192

September 23, 2018
Pinal Dave
SQL Interview Questions and Answers
Quotes, SQL Scripts, SQL Server

How do you escape a single quote in SQL Server? A college student asked me at a Bangalore user group, a few people laughed, and here is the simple answer.

Read More
Gouache painting: a haystack inside a wooden barn with one small vermilion button hidden in the straw, a hanging lantern above it, warm light through the barn slats

Find Rows With Single Quotes in SQL Server: SQL in Sixty Seconds #075

October 22, 2014
Pinal Dave
SQL Video
Quotes, SQL in Sixty Seconds, SQL Scripts, SQL String

To find rows with single quotes, write the quote twice inside the search string. This post tests four search patterns on one million rows on SQL Server 2025, shows which two are the same query and which one costs more, and covers the curly quote that a straight quote search misses.

Read More
Old workshop wall covered with pinned handwritten notes above a cluttered workbench

SQLAuthority News – 10 Motivational Quotes from Technologiest of the Past

December 6, 2008
Pinal Dave
Personal
Quotes

Here are 10 motivational quotes from great technologists of the past, from Elbert Hubbard to Thomas Edison and Douglas Adams. Add your favorite too.

Read More
  • Books
  • Testimonials
  • Privacy Policy

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