code:
String myTblN = fileN[0];
PreparedStatement creatTableStmt =
conn.prepareStatement("create table " + myTblN +" like stocktradtbl");
System.out.println(creatTableStmt);
creatTableStmt.execute();
error:
com.mysql.cj.jdbc.ClientPreparedStatement: create table 00002 like stocktradtbl java.sql.SQLSyntaxErrorException: 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 00002 like stocktradtbl' at line 1
How to use value of variable myTblN in java as table name of mysql?
00002is not a valid identifier, since identifiers must start with a letter.