SQL如何合并几个列名不同的结果到一个结果集中

网上找了一圈,没有找到合适的,后来自己试了个语句,居然可以,记录下来

select * from
(select count(1) as cgtg from [dbo].[kv_cabinetbushing] a where a.isdel=0 and a.supplierWorkNo='') a,
(select count(1) as cth from [dbo].kv_contactbox a where a.isdel=0 and a.supplierWorkNo='')b

  

posted @ 2023-02-28 22:13  sharestone  阅读(68)  评论(0编辑  收藏  举报