在我的数据库里有一种类型叫做 ShopType
它是 ('Pizzeria','Pub','Cafe')
. 在java中,我想执行以下查询:“ SELECT * FROM myTable WHERE myType = ?
“我准备了一份声明:
PreparedStatement statement = connection.prepareStatement(query);
statement.setString(1, type);
但我有个例外: ERROR: operator does not exist: ShopType = character varying
我该怎么解决?
暂无答案!
目前还没有任何答案,快来回答吧!