如何在Presto中跳出'
(單引號)?我如何逃避Presto中的單引號?
這是我想用它
select count(*) as count from uploads where title not in ('Driver's License')
我已經試過通常逃逸:,'Driver\'s License'
,"Driver's License"
,E'Driver\'s License'
但似乎沒有任何工作。 Presto的文檔含糊不清。有人知道嗎?
如何在Presto中跳出'
(單引號)?我如何逃避Presto中的單引號?
這是我想用它
select count(*) as count from uploads where title not in ('Driver's License')
我已經試過通常逃逸:,'Driver\'s License'
,"Driver's License"
,E'Driver\'s License'
但似乎沒有任何工作。 Presto的文檔含糊不清。有人知道嗎?
答案是由a_horse_with_no_name提供,是使用另一個'
。
'Driver''s License'
將一個單引號兩次到位單引號,你需要逃避的:
select count(*) as count
from uploads
where title not in ('Driver''s License')
在(標準)SQL這將是'「司機」的License'' –
工作正常!謝謝! – scottshepard