spring data jpa使用原生sql查询 

@Repository
public interface AjDao extends JpaRepository<Aj,String> {
    //使用原生sql时Query注解需要添加属性,nativeQuery=true
    @Query(nativeQuery =true,value = "select max(to_number(XH)) FROM AJ")
    String getMaxXh();
}

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-09-09
  • 2022-12-23
  • 2022-12-23
  • 2021-09-23
  • 2022-01-16
  • 2022-03-04
猜你喜欢
  • 2021-11-09
  • 2022-12-23
  • 2021-07-18
  • 2022-01-21
  • 2021-05-10
  • 2021-08-17
  • 2021-07-15
相关资源
相似解决方案