Q: Spring custom query escape : I have a custom query in Spring which look's like this
@Query(value = "select s.* from (select @p1:= :profileId p) parm , v_source_result_average_by_profile s;", nativeQuery = true)

The problem is that spring thinks after the first : there is a parameter but there isn't. Is there a way to escape the character?

A: Solved by just adding \\ like this
@Query(value = "select s.* from (select @p1\\:= :profileId p) parm , v_source_result_average_by_profile s;", nativeQuery = true)

