I am using SQL server 2005 and using the northwind database. I need the supplier id of Grandma Kelly's Homestead and I used this query:
select supplierid from suppliers
where companyname ='Grandma Kelly''s'' Homestead'
I checked the link Escaping a single quote in sql server, but I can't find an answer.
I used the two single quotes but it didn't work since the query is executing but it doesn't return a value.
How can I escape the single quote and retrieve the value? I would also like to know how to insert the values into the table having quotes