我知道版本太旧了(是的,版本4!),但我别无选择.
如何仅为DB2 AS400限制我的查询例如100行?
FETCH FIRST n ROWS ONLY
Run Code Online (Sandbox Code Playgroud)
和
ROW_NUMBER()
Run Code Online (Sandbox Code Playgroud)
不工作.
任何想法或解决方法?
这是一个示例SQL查询(不起作用):
SELECT POLNOP FROM ZICACPTF.POLHDR FETCH FIRST 10 ROWS ONLY
Run Code Online (Sandbox Code Playgroud)
它说
[SQL0199]不期望关键字FETCH.有效令牌:FOR WITH ORDER UNION OPTIMIZE.
例,
我有
@NotEmpty //tells you 'may not be empty' if the field is empty
@Length(min = 2, max = 35) //tells you 'length must be between 2 and 35' if the field is less than 2 or greater than 35
private String firstName;
Run Code Online (Sandbox Code Playgroud)
然后我输入一个空值.
它说''可能不是空的长度必须在2到35之间'
是否有可能告诉spring每个字段一次验证一个?