How to deal with like clause with special char like _,\,% in jooq

Viewed 39

I'd like to use sql with special char to search list such as select * from test where name like "%_%" but this will also search - and _, so how can I deal with it? and how about char % or ?

1 Answers

Just like in native SQL using escape()

TEST.NAME.like("%!_%").escape('!')
Related