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.
WHERE City = 'Villeneuve-d''Ascq'
Reference : Pinal Dave (