开发者社区> 问答> 正文

case表达式中其他例子有哪些?

case表达式中其他例子有哪些?

展开
收起
游客gzyuldo4mrg6i 2022-03-29 19:33:58 667 0
1 条回答
写回答
取消 提交回答
  • select case (select count(*) as s1 from t1 where a = 1)

    when (select count(*) as s2

    from t1, t2

    where t1.a = t2.a

    and t2.a = 1) then

    '相等'

    else

    '不相等'

    end

    from dual;

    2022-03-29 19:34:34
    赞同 展开评论 打赏
问答地址:
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载

相关实验场景

更多