mysql unionall的一种使用方法
来源:互联网 发布:淘宝15万贷款技术 编辑:程序博客网 时间:2024/06/06 03:45
SELECT
*
FROM
((
SELECT
NotificationBase.ID 通知ID,
NotificationDistributed.DistributionState 通知状态
FROM
NotificationBase
LEFT JOIN NotificationDistributed ON NotificationBase.ID
= NotificationDistributed.NotificationID
WHERE
NotificationDistributed.Receiver = '282b4fa100920146eb8c519892d6066310104469740cee8d12'
)
UNION ALL
(
SELECT
NotificationBase.ID 通知ID,
NotificationBase.ATTR8 通知状态
FROM
NotificationBase
*
FROM
((
SELECT
NotificationBase.ID 通知ID,
NotificationDistributed.DistributionState 通知状态
FROM
NotificationBase
LEFT JOIN NotificationDistributed ON NotificationBase.ID
= NotificationDistributed.NotificationID
WHERE
NotificationDistributed.Receiver = '282b4fa100920146eb8c519892d6066310104469740cee8d12'
)
UNION ALL
(
SELECT
NotificationBase.ID 通知ID,
NotificationBase.ATTR8 通知状态
FROM
NotificationBase
LEFT JOIN NotificationAttachment ON NotificationBase.ID
= NotificationAttachment.NotificationID
WHERE
NotificationBase.NotificationType IN (
'公告-公告'
)
AND NotificationBase.YouthLeague IN (
'JXW-001-032-008'
)
)
) A
ORDER BY
发布时间 DESC
LIMIT 10
= NotificationAttachment.NotificationID
WHERE
NotificationBase.NotificationType IN (
'公告-公告'
)
AND NotificationBase.YouthLeague IN (
'JXW-001-032-008'
)
)
) A
ORDER BY
发布时间 DESC
LIMIT 10
阅读全文
0 0
- mysql unionall的一种使用方法
- Minus intersect Union UnionAll 使用方法
- mysql in or union 和 unionall 的 浅析
- 1、Mysql:mysql简单的索引和in、or、union unionall语句查询速度
- Union和UnionAll的区别
- union和unionAll的区别
- goroutine的一种使用方法
- semaphore的一种使用方法
- WebView的一种使用方法
- ResourceBundle 的一种使用方法
- mysql简单的索引和in、or、union unionall语句查询速度
- struts2的 redirect 一种使用方法
- SQL中UNION与UNIONALL的区别
- SQLServer2000中UNION与UNIONALL的区别
- 数据库中 union和unionall的区别
- perl的一种进程的使用方法
- VB中子母表的一种使用方法
- linux下tap的一种使用方法
- 查字典?看唐诗?为孩子起名何必那么麻烦,来看女孩起名大全
- bootstrap之scaffolding&tables样式
- 阿里数据库DevOps最佳实践
- [Leetcode] 424. Longest Repeating Character Replacement 解题报告
- Android 片段——Fragment的使用
- mysql unionall的一种使用方法
- struts2(四)
- ubuntu 下更新 GPU 驱动
- MFC中用c++语言实现获取文件路径(拖拽获取)
- 指针函数和函数指针
- js禁止右键和f12
- 踏踏实实的学习
- 有道云笔记高级语法
- YUV格式