I'm trying to frame a select query using JPA repository.
select *
from Foo
where name = 'testapp'.
The "NAME" column is defined as varchar(4). My program throws SQLCODE=-302, SQLSTATE=22001 for the select operation whereas I get the same query working in the SQL developer IDE.
答案 0 :(得分:0)
那很奇怪!您是如何获得数据的?testapp'插入到表格的名称列中。如果将其定义为VARCHAR(4),则首先不能插入超过4个字节的内容。你确定它是VARCHAR(4)吗?