I am trying to create the database using a prepared statement in MySQL. Here I am passing the parameters as shown.
PreparedStatement createDbStatement = connection.prepareStatement("CREATE DATABASE ?");
createDbStatement.setString(1, "first_database");
createDbStatement.execute();
connection.commit();
But I am getting a syntax error. Is it possible to create tables and databases using prepared statements?