like this:
public interface XXXRepository extends CrudRepository<XXX, Integer> {
@Query(value = "select * from ?1 where ...", nativeQuery = true)
List<XXX> findByXXX(String tableName, ...);}
It gives MYSQL syntax error with upon codes. The syntax error shows that the table name in the SQL is surrounded with "'".
This is not possible. Parameters are only allowed in the where clause.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With