I have this Oracle query implemented as HQL and Spring Boot query which I want to migrate to PostgreSQL
@Query("select profileId from HrDepartment where profileId = :id and profileId is not null and rownum = 1)")
String getProfileId(@Param("id") String id);
What is the proper way to use migrate rownum to PostgreSQL?