a guest Jun 30th, 2018 100 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- Class.forName("com.mysql.jdbc.Driver") ;
- Connection conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/DBNAME", "usrname", "pswd") ;
- Statement stmt = conn.createStatement() ;
- String query = "select columnname from tablename ;" ;
- ResultSet rs = stmt.executeQuery(query) ;
RAW Paste Data