美文网首页
SQL count(*)和*

SQL count(*)和*

作者: Chelsea丶 | 来源:发表于2020-03-20 17:02 被阅读0次
        preparedStatement = connection.prepareStatement(sql);
                preparedStatement.setString(1,logname);
                resultSet = preparedStatement.executeQuery();
                if(resultSet.next()){
                    flag = true;
                }else{
                    flag = false;
                }
    

    这边用count(*),无论是否查询到,都会使result=true,所以查询语句以后用

    select * from 
    

    相关文章

      网友评论

          本文标题:SQL count(*)和*

          本文链接:https://www.haomeiwen.com/subject/guajyhtx.html