Wednesday, November 30, 2022

How to insert a string value with an apostrophe (single quote) in a column

 INSERT INTO testtable VALUES (1,'Naresh C'houlla')

Msg 102, Level 15, State 1, Line 1
Incorrect syntax near ‘houlla’.
Msg 105, Level 15, State 1, Line 1
Unclosed quotation mark after the character string ‘)

 INSERT INTO testtable VALUES (1,'Naresh C''houlla')