Get the App
SLTechnology News&Howtos  ›  Database  › 

Mysql uses union all query to count the total quantity

Shulou Source: shulou.com Published: 2022-06-01 10:36:21 09月30日 Update

Select sum (A.B) as num from (

Select count () as b from table_1

Union all

Select count () as b from table_2

) as a (note that individual names should be given here)

Tags: A.B quantity query statistics Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn Redmi MariaDB Shulou Information Huawei