我正在创建一个登录表单,我希望密码区分大小写。我写了以下代码。如何使用 where 子句使其区分大小写。
PreparedStatement stm = con.prepareStatement(" select * from user where userid =? and password =?" );
stm.setString(1, userid);
stm.setString(2, pswd);
ResultSet rs =stm.executeQuery();
if (!rs.next()) {
JOptionPane.showMessageDialog(this, "Invalid Id/Password");
}