how to create a database table, where the table name is assigned from the user input variable.
it is something like value of variable JtextField.getText() should be used as name of the table as CREATE TABLE JTextField.getText() is it possible and how to do it.
Re: java mysql
The following will create a table with the fields from String field (in this case Surname) and Forename. There are better ways, those "'s in String query are a pain to get right.
Statement statement = con.createStatement();
String field = "Surname";
String query = "Create Table Pupil(" + field + " CHAR(30), Forename CHAR(30))";