Advertisement
Guest User

Main1

a guest
Feb 19th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. import java.sql.Connection;
  2. import java.sql.DriverManager;
  3. import java.sql.PreparedStatement;
  4. import java.sql.SQLException;
  5.  
  6. public class Main1 {
  7. private static final String QUERY1 = "";
  8. private static final String QUERY2 = "";
  9. private static final String QUERY3 = "";
  10. private static final String QUERY4 = "";
  11. private static final String QUERY5 = "";
  12. private static final String QUERY6 = "";
  13.  
  14. public static void main(String[] args) {
  15. try (Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/exam2poprawa?useSSL=false", "root", "coderslab")) {
  16. PreparedStatement ps = con.prepareStatement(QUERY1);
  17. ps.executeUpdate();
  18.  
  19. ps = con.prepareStatement(QUERY2);
  20. ps.executeUpdate();
  21.  
  22. ps = con.prepareStatement(QUERY3);
  23. ps.executeUpdate();
  24.  
  25. ps = con.prepareStatement(QUERY4);
  26. ps.executeUpdate();
  27.  
  28. ps = con.prepareStatement(QUERY5);
  29. ps.executeUpdate();
  30.  
  31. ps = con.prepareStatement(QUERY6);
  32. ps.executeUpdate();
  33.  
  34. } catch (SQLException e) {
  35. e.printStackTrace();
  36. }
  37. }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement