My problem is that intellij raise an error that unable to resolve table user.
Table is created in database it can be seen in database in Intellij but it looks like compiler doesn't have an access to it. Did someone have similiar problem?
public void getUser(String user) {
connect();
String SQL = "SELECT users , password FROM users WHERE users = ?";
try {
pstmt = connection.prepareStatement(SQL);
pstmt.setString(1, user);
pstmt.executeUpdate();
ResultSet rs = pstmt.executeQuery(SQL);
System.out.println(rs.getString("password"));
} catch (SQLException ex) {
System.out.println(ex.getMessage());
}