Here is my Java JDBC code (modified and simplified for example):
ps = connection.prepareStatement("SELECT a,b,c FROM mytable WHERE category ~ ?");
ps.setString(1, "my/super/category/abc(def");
^
|
+---------------------------------+
|
//this character is problem
result = ps.executeQuery();
It didn't work because of round bracket in string.
How to escape round brackets in prepared statement?
EDIT: based on my answer (see below) I do correct to question.