1

In our project, we will create the new table on monthly. like jan_2020 feb_2020 etc in mysql database.we need to fetch today's data every End of the day. How can I query to the tables that names are changing on monthly.

java Pojo is:

@Entity
@Table(name = "sqlt_data_1_2020_10")
public class SqltData {

@Id
private int tagid;

private Double intvalue;

private Double floatvalue;
private Double stringvalue;
private Date datevalue;
private int dataintegrity;
private BigInteger tStamp;

public SqltData() {

}
 }

Thanks in advance.

  • 1
    Is this (https://stackoverflow.com/questions/8573468/hibernate-data-object-with-a-dynamic-table-name-by-annotations) what you're looking for? – Sorin Mar 02 '21 at 16:03

0 Answers0