侧边栏壁纸
  • 累计撰写 187 篇文章
  • 累计收到 24 条评论

union 连接 实例

五好
2022-05-24 / 0 评论 / 362 阅读 / 正在检测是否收录...
select * from table where company=A order by rand() limit 2 
union
select * from table where company=B order by rand() limit 2 

该语句可以实现 随机取出 AB公司各2条相关数据。

0

评论 (0)

取消