Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //load Driver class
- Class.forName("com.mysql.jdbc.Driver");
- //get Connection
- Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/School", "root", "1947");
- //get statement
- Statement stmt=con.createStatement();
- //load ResultSet
- ResultSet rs1=stmt.executeQuery("select *from Student");
Add Comment
Please, Sign In to add comment