Home > Database > Mysql Tutorial > sql 多表返回汇总结果

sql 多表返回汇总结果

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 14:57:08
Original
1382 people have browsed it

t-sqlcompute函数 目前只在2008里用了。。其他的么有试过 无 with tb(id,product,barcode,qty) as(select 1,'AA',240,3union all select 2,'BB',245,2union all select 3,'AA',255,2union all select 4,'BB',240,1)select * from tb compute sum(qty),sum(bar

t-sql compute函数
目前只在2008里用了。。其他的么有试过
with tb(id,product,barcode,qty) as
(
select 1,'AA',240,3
union all select 2,'BB',245,2
union all select 3,'AA',255,2
union all select 4,'BB',240,1
)

select * from tb compute sum(qty),sum(barcode)
Copy after login
Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
sql file
From 1970-01-01 08:00:00
0
0
0
php - Overhead of prepare vs sql?
From 1970-01-01 08:00:00
0
0
0
Print sql statement
From 1970-01-01 08:00:00
0
0
0
Pass array to SQL insert query using PHP
From 1970-01-01 08:00:00
0
0
0
sql optimization or
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template