查看用户是否有多个角色

-----1.测试表
create table secom_666
( a number,
   b number)
-----2.添加数据
   select * from secom_666 for update;

1、10

1、10

1、11
----3.测试语句
   select  count(r.a) from (select t.a,t.b from secom_666 t group by t.a,t.b ) r where r.b in (10,11) group by r.a  having count(r.a)>1

posted @ 2017-09-08 15:32  albert_think  阅读(199)  评论(0编辑  收藏  举报