sql题目,求大神解答

lay90215 2015-01-21 09:16:42
现在有A,B,C三列,使用一句SQL语句,查询出A列和C列的值不重复,且B列存在的数据
...全文
358 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
sunboy_yf 2015-01-23
  • 打赏
  • 举报
回复
select a, c , b from mytable where b is not null group by a,c having count(a) = 1
卖水果的net 2015-01-23
  • 打赏
  • 举报
回复
这个需求,比较模糊。 楼上几位有理解成了 a , c 不相等。 我理解成,各行不重复.

select a, c , max(b) from mytable where b is not null group by a,c
fly_20100608 2015-01-22
  • 打赏
  • 举报
回复
select * from test where a<>c and b is not null
lqb2008 2015-01-22
  • 打赏
  • 举报
回复
感觉需求没表达清楚
bw555 2015-01-22
  • 打赏
  • 举报
回复
真像一楼想的这么简单吗?
zujinsheng 2015-01-21
  • 打赏
  • 举报
回复
select * from table_xx t where t.A<>t.C and t.B is not null

17,377

社区成员

发帖
与我相关
我的任务
社区描述
Oracle 基础和管理
社区管理员
  • 基础和管理社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧