Sunday, February 14, 2016

When putting strings in T-SQL for inserts, you wrap the strings in single quotes so how do you have a single quote in a string itself?

You use a double single quote to represent a single quote. That's a single quote typed twice and not to be confused with a double tick.

Insert INTO Techies (Name) Values ('O''May')

No comments:

Post a Comment