I'm using native query to fetch the pagination results from PostgreSQL and I used this query and I'm getting the below exception:
SELECT a.*
FROM table1 a LEFT OUTER JOIN table2 b ON a.clmn1 = b.clmn1
WHERE (a.clmn3 = ?3 OR a.clmn4 ISNULL)
ORDER BY a.clmn1 DESC offset = ?1 limit = ?2
Query:
@Query(nativeQuery = true, value="select a.* from table1 a left outer join table2 b ON a.clmn1 = b.clmn1 where (a.clmn3= ?3 OR a.clmn4 isnull) order by a.clmn1 desc offset = ?1 limit = ?2")
public List<Result> getResults(int offset, int limit, int value);
Exception:
org.postgresql.util.PSQLException: ERROR: syntax error at or near "="
Please suggest.