Jr. Developer asked me other day how to escape single quote?
User can escape single quote using two single quotes (NOT double quote).
Following T-SQL Script will give error
WHERE City = ‘Villeneuve-d’Ascq’
Error: 105 Unclosed quotation mark after the character string ‘
To fix the error mentioned above, escape single quotes with two single quotes as displayed in following example.
USE AdventureWorks GO SELECT * FROM Person.Address WHERE City = 'Villeneuve-d''Ascq' GO
Reference : Pinal Dave (http://blog.SQLAuthority.com)