Working with SQL-Style Strings

Learn how to work with SQL-style strings with the help of examples.

Example SQL query

Consider the sample SQL query below. Suppose we want to extract all of the strings inside it. These values can be a bit trickier to retrieve from a piece of text, mainly because they use two occurrences of the string delimiter character as the escape sequence.

SELECT * FROM companies WHERE name = 'Jim''s Tackle Shop'
OR name = 'Bob''s Burger'

We can also solve this problem using our cursor concept, ...