Advertisement
Guest User

Untitled

a guest
Nov 16th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. public static void createTable()
  2. {
  3. PreparedStatement statement1 = null;
  4. try
  5. {
  6. Connection connection = MySQL.getConnection();
  7. assert (connection != null);
  8. statement1 = connection.prepareStatement("CREATE TABLE IF NOT EXISTS uhc_stats( " +
  9. " uuid VARCHAR(36) NOT NULL PRIMARY KEY, " +
  10. " wins INT(100) NOT NULL DEFAULT '0', " +
  11. " kills INT(100) NOT NULL DEFAULT '0'," +
  12. " deaths INT(100) NOT NULL DEFAULT '0'," +
  13. "`coal-mined` INT(100) NOT NULL DEFAULT '0'," +
  14. " `iron-mined` INT(100) NOT NULL DEFAULT '0'," +
  15. " `gold-mined` INT(100) NOT NULL DEFAULT '0'," +
  16. " `lapis-mined` INT(100) NOT NULL DEFAULT '0'," +
  17. " `redstone-mined` INT(100) NOT NULL DEFAULT '0'," +
  18. " `diamond-mined` INT(100) NOT NULL DEFAULT '0'," +
  19. " `emerald-mined` INT(100) NOT NULL DEFAULT '0');");
  20. statement1.executeUpdate();
  21. } catch (SQLException e)
  22. {
  23. e.printStackTrace();
  24. } finally
  25. {
  26. try
  27. {
  28. assert (statement1 != null);
  29. statement1.close();
  30. } catch (SQLException e)
  31. {
  32. e.printStackTrace();
  33. }
  34. }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement