Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void main(String[] args) throws SQLException {
- try (Connection c = DriverManager.getConnection("jdbc:postgresql://localhost/webtester", "webtester", "password")) {
- Statement st = c.createStatement();
- ResultSet rs = st.executeQuery("select * from account");
- while (rs.next()) {
- System.out.println(rs.getString(2));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement