【发布时间】:2018-11-14 21:19:59
【问题描述】:
我有一个查询,当列值为空时,我不想在 where 条件中附加“and”子句,例如
select * from x where x.abc = 'ACTIVE' and x.start_date < sysdate and x.end_date > sysdate
因此,我希望 x.end_date 仅在其值不为 null 时才适用。没有任何存储过程,只是一个简单的查询。
我还想使用标准构建器和谓词将此查询转换为 spring-data jpa 规范。
【问题讨论】:
标签: sql oracle spring-data-jpa