1、根据表查询所在数据库
select table_schema from information_schema.tables where table_name ='你要查询的表名(注意要使用大写字母)';
select table_schema from information_schema.tables where table_name =''

查询重复数据
select userYoulunum from UcUser GROUP BY userYoulunum HAVING COUNT(*)>1

 

筛选数据
SELECT COUNT(1) FROM `usercenter20200530`.`UcUser` WHERE `userFlag` = 'S' AND `userYoulunum` IS NOT NULL;

SELECT COUNT(1) FROM `usercenter20200530`.`UcUserYouluNum` WHERE `useFlag` = '1';

posted on 2021-08-24 11:32  月光之下  阅读(32)  评论(0编辑  收藏  举报