How do I escape a single quote in Presto?

scottshepard picture scottshepard · Sep 20, 2017 · Viewed 12.8k times · Source

How can I escape a ' (single quote) in Presto?

This is where I am trying to use it

select count(*) as count from uploads where title not in ('Driver's License')

I've tried the usual escapes: , 'Driver\'s License', "Driver's License", E'Driver\'s License' but nothing seems to work. Presto's docs are vague. Anyone know?

Answer

scottshepard picture scottshepard · Sep 20, 2017

The answer, provided by a_horse_with_no_name, is to use another '.

'Driver''s License'