jdbc使用preparedstatement的诡异问题
PreparedStatement pstmt2 = conn.prepareStatement("select * from employee where num = ‘N014’ " );
用这句查询没问题,但是用了占位符,死活不行
String num = "N014";
PreparedStatement pstmt2 = conn.prepareStatement("select * from employee where num = ? " );
pstmt2.setString(1, "N014");
返回的总是空集,有大神帮忙看看吗