티스토리 뷰
Programming/Spring
[spring jpa] Space is not allowed after parameter prefix ':'
마음 부자 2022. 10. 19. 07:31반응형
[spring jpa] Space is not allowed after parameter prefix ':'
: 들어가면 에러가 남
@Query(value = "select (@rownum := @rownum+1) as no
"from table " , nativeQuery = true)
아래 처럼 \\: 또는 \:로 바꿔준다 (하이버네이트 상위 버전은 백스페이스 한 개로 처리가 됨)
@Query(value = "select (@rownum \\:= @rownum+1) as no
"from table " , nativeQuery = true)
반응형
'Programming > Spring' 카테고리의 다른 글
[java] map to json (json 키를 대문자에서 소문자로 변환) (0) | 2023.02.08 |
---|---|
[java] 랜덤 문자열 생성하기 (0) | 2022.11.02 |
[SPRING JPA] java.sql.SQLException: Unknown label Possible value (0) | 2022.10.18 |
[SPRING] 요소 유형 "update"의 콘텐츠는 "(include|trim|where|set|foreach|choose|if|bind)"과(와) 일치해야 합니다. (0) | 2022.05.20 |
[java] 문자열 연결 성능 (StringBuilder vs String.Concat vs + ) (0) | 2022.01.13 |
댓글
반응형