I have this application, java spring boot and mysql db.
When i try to run the following query, i get this error.
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'email ='[email protected]'' at line 1
Does anyone know know why?
@Query(value = "SELECT voucher_code FROM voucher INNER JOIN "
+ "offer ON offer.name = voucher.offer "
+ " email =:email", nativeQuery = true)
List<Voucher> getVouchers(@Param("email") String email);
email =?