数据库插入数据排重

来源:互联网 发布:网络终结者校园网 编辑:程序博客网 时间:2024/05/17 08:33

 StringBuilder sql = new StringBuilder();

sql.append(" select count(1) ");
sql.append(" from " + TABLE_NAME + " spc ");
sql.append(" where spc.share_id = ? ");
sql.append(" and spc.comment_person = ? ");
sql.append(" and spc.comment_time = ? ");
sql.append(" and instr(?, spc.comments) > 0 ");
原创粉丝点击