zoukankan      html  css  js  c++  java
  • mysql一条sql查询多个表数据量

    select
    (select count(*) from device0 where status != 0),
    (select count(*) from device1 where status != 0),
    (select count(*) from device2 where status != 0),
    (select count(*) from device3 where status != 0),
    (select count(*) from device4 where status != 0),
    (select count(*) from device5 where status != 0),
    (select count(*) from device6 where status != 0),
    (select count(*) from device7 where status != 0),
    (select count(*) from device8 where status != 0),
    (select count(*) from device9 where status != 0)
    as count

    select
    (select count(*) from device0 where status != 0)+
    (select count(*) from device1 where status != 0)+
    (select count(*) from device2 where status != 0)+
    (select count(*) from device3 where status != 0)+
    (select count(*) from device4 where status != 0)+
    (select count(*) from device5 where status != 0)+
    (select count(*) from device6 where status != 0)+
    (select count(*) from device7 where status != 0)+
    (select count(*) from device8 where status != 0)+
    (select count(*) from device9 where status != 0)
    as count

  • 相关阅读:
    jquery文本折叠
    物理小词典
    程序员的十层楼
    各种语言的hello world
    读书遇到的一些概念
    银行业务一些概念
    mysql 基本操作
    oracle 基本操作
    maven 基本操作
    ubuntu JavaWeb环境搭建
  • 原文地址:https://www.cnblogs.com/changfengSven/p/7484024.html
Copyright © 2011-2022 走看看