escape character in sql for single quote code example
Example 1: sql escape quote
DECLARE @my_table TABLE (
[value] VARCHAR(200)
)
INSERT INTO @my_table VALUES ('hi, my name''s tim.')
SELECT * FROM @my_table
Example 2: sql quote in string
/*adding single quote into the string in SQL*/
on P.SupplierID=S.SupplierID
where S.CompanyName in
('Tokyo Traders','Exotic Liquids','Grandma Kelly''s Homestead')
Example 3: SQL Server escape single quote dynamic SQL
select 'that''s it'