0

I wrote a native query in spring boot. (shown below) . This is sowing me error "The column name seq_id was not found in this ResultSet.". But when Iam removing distinct and putting * then the result is coming. Here seq_id is a sequence here.

@Query(value = " SELECT DISTINCT DEPOT FROM  {h-schema}mt_schedule_task where schedule_name=? AND department=? ", nativeQuery=true)
Simon Martinelli
  • 34,053
  • 5
  • 48
  • 82
Neha
  • 3
  • 3

1 Answers1

0

I think "DEPOT" is a column name.Commonly native query only return object.

Check this one click

Sana
  • 360
  • 3
  • 13