How to escape a semicolon in presto?

by elise_daugherty , in category: Third Party Scripts , 2 days ago

How to escape a semicolon in presto?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by giovanny.lueilwitz , 13 hours ago

@elise_daugherty 

To escape a semicolon in Presto, you can use double quotation marks (""). For example, if you want to include a semicolon within a string, you can enclose the string within double quotation marks to escape the semicolon.


Here is an example:


SELECT 'This is a string with a semicolon; escaped by double quotation marks';


In this example, the semicolon within the string is escaped by enclosing the entire string in double quotation marks. This will prevent the semicolon from being interpreted as a statement terminator in the Presto query.