I have been trying to create a table in the database. The code shows no error and runs fine but in the end no table was created in the database. Help please.
public void createTable(){
try {
String host = "jdbc:derby://localhost:1537/fypDB";
String uname = "test";
String pword = "test";
Connection con = DriverManager.getConnection( host, uname, pword );
Statement stmt = con.createStatement();
//username is valid variable from main class
String SQL = "CREATE TABLE "+username+" (classId VARCHAR(255), "+"PRIMARY KEY ( classId ))";
stmt.executeUpdate( SQL );
System.out.println(SQL);
} catch (SQLException err){
System.out.println(err.getMessage());
}
}