删除粉丝表中抓取错误的数据-微信公众平台开发

2019-09-30 作者:网络时代   |   浏览(150)

下面我给各位同学写了一条删除错误数据的sql希望对各位有帮助。

资料来源于网络,仅供参考学习。

 代码如下

CREATE TABLE test(
a INT,
b INT,
c INT,
KEY idx(a,b,c)
);

SELECT *
FROM enet_wechatfans
WHERE fakeid
IN (
SELECT fakeid
FROM (
SELECT COUNT( * ) c, id, fakeid
FROM  `enet_wechatfans`
WHERE weid =135
GROUP BY fakeid
HAVING c >1
澳门新葡亰网址大全,) AS tmp
) AND weid = 135

优: SELECT * FROM test WHERE a=10 AND b>50;
差: SELECT * FROM test WHERE b>50;

优: SELECT * FROM test ORDER BY a;
差: SELECT * FROM test ORDER BY b;
差: SELECT * FROM test ORDER BY c;

优: SELECT * FROM test WHERE a=10 ORDER BY a;
优: SELECT * FROM test WHERE a=10 ORDER BY b;
差: SELECT * FROM test WHERE a=10 ORDER BY c;

本文由澳门新葡亰网址大全发布于网络时代,转载请注明出处:删除粉丝表中抓取错误的数据-微信公众平台开发

关键词: