diff --git a/api/src/main/java/lab/en2b/quizapi/questions/question/QuestionRepository.java b/api/src/main/java/lab/en2b/quizapi/questions/question/QuestionRepository.java index d957acb0..7a141ef3 100644 --- a/api/src/main/java/lab/en2b/quizapi/questions/question/QuestionRepository.java +++ b/api/src/main/java/lab/en2b/quizapi/questions/question/QuestionRepository.java @@ -4,6 +4,6 @@ import org.springframework.data.jpa.repository.Query; public interface QuestionRepository extends JpaRepository { - @Query(value = "SELECT * FROM questions ORDER BY RAND() LIMIT 1", nativeQuery = true) + @Query(value = "SELECT * FROM questions ORDER BY RANDOM() LIMIT 1", nativeQuery = true) Question findRandomQuestion(); }