Guest User

Untitled

a guest
Oct 5th, 2018
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. //load Driver class
  2. Class.forName("com.mysql.jdbc.Driver");
  3.  
  4. //get Connection
  5. Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/School", "root", "1947");
  6.  
  7. //get statement
  8. Statement stmt=con.createStatement();
  9.  
  10. //load ResultSet
  11. ResultSet rs1=stmt.executeQuery("select *from Student");
Add Comment
Please, Sign In to add comment