I'm using PostgreSQL database,and i have a select query result.I want this query result to save in .dat file.How can i achieve this?
@Repository
public interface EmpHeaderRepository extends JpaRepository<EmpHeaderDetails, Long> {
@Query("select e.header_info from EmpHeaderDetails e" )
public List<EmpHeaderDetails> findByHeader_info(String header_info);
}
This is the query in my repository.
Query result should be saved in the .dat file.How should i do this?