SQL中从不同表中链接数据计算
从多个表中获取新的数据表,然后对新数据表的字段进行计算求值。
select (Number01.N1/Number02.N2) --get tow table_fields from (select count(A.field01)as N1 from Table01 A, Table02 B where A.field01=B.field02) Number01, --like new Table (select count(B.field02) as N2 from Table02 B) Number02 --like new Table
多个表的数据需求,也是类似的获取,然后计算。每个数据的获取,都类似的像建立了一个新的临时表。
本站文章为和通数据库网友分享或者投稿,欢迎任何形式的转载,但请务必注明出处.
同时文章内容如有侵犯了您的权益,请联系QQ:970679559,我们会在尽快处理。