部分代码如下,如果keyWord="";即空串,那么代码查询的表中全部内容吗??
具体怎么解释???[code=java] String sql = "SELECT empno,ename,job,hiredate,sal FROM emp WHERE ename LIKE ? OR job LIKE ?" ;
this.pstmt = this.conn.prepareStatement(sql);
this.pstmt.setString(1,"%"+keyWord+"%");
this.pstmt.setString(2,"%"+keyWord+"%");
ResultSet rs = pstmt.executeQuery();[/code] |
|