求大家一SQL语句难题!! select * from 表 A join 表 B on A.mobile=B.mobile and A.s_code<>B.s_code 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select b.* from stone b,(select mobile,count(*) from stonegroup by mobilehaving count(*)>1) awhere a.mobile = b.mobile select distinct mobile, s_code from stone order by mobile, s_code 没试过,不知道可以不select distinct * from table AA where (select count(s_code) from table where mobile=AA.mobile)>1 select *from stone swhere exists(select * from stone st where s.mobile=st.mobile and s.s_code<>st.s_code) select a.* from mobile a,(select mobile, cnt=count(*) from stone group by mobile) b,where a.mobile = b.mobile and b.cnt > 1 不应该有mobile和s_code都相同的记录. select *from stone t1join stone t2 on(t1.mobile=t2.mobile)where t1.s_code<>t2.s_code UNIQUE 约束对长度有要求? 索引或主键的总字节数不应超过900字节 中文分词服务器(C语言开发+词库+源代码),最大特色可以让javascript来调用!当然也可以让其他任何语言来调用 求教一个简单的查询语句,新手在线等! 我要对表中的用户分数排名次.请问该怎么做比较好?? 数据库分发问题 Help,给我个大致思路就行 题目: 数据库中表的内容生成器 数据库异地备份 求救高手: 为什么这个储存过程会运行得很慢? 运行一次要几分钟时间? 时间戳的问题 如何让菜单运行在表单上? 使用了sp_addsrvrolemember添加一个用户后的问题 困扰,如何写这句SQL语句?
(select mobile,count(*) from stone
group by mobile
having count(*)>1) a
where a.mobile = b.mobile
order by mobile, s_code
from stone s
where exists(select * from stone st where s.mobile=st.mobile and
s.s_code<>st.s_code)
from mobile a,
(select mobile, cnt=count(*) from stone group by mobile) b,
where a.mobile = b.mobile
and b.cnt > 1 不应该有mobile和s_code都相同的记录.
from stone t1
join stone t2 on(t1.mobile=t2.mobile)
where t1.s_code<>t2.s_code