1

I want to pass variable instead table name using @Query annotation but doesn't work..

@Modifying
 @Query(value="insert into :table (name,password) values (:name,:password)",nativeQuery=true) 
 void add  (@Param(":table") String table,@Param("name") String name,@Param("password") String password);

please, I want to pass variable instead table name what ever the way is.

Ahmed Sakr
  • 129
  • 1
  • 9

0 Answers0