|
按照ppt的思路,我五个表每张表都建了一个冗余的字段来相互对应,基本上实现了目的- SELECT *
- FROM [select * from (select * from (select * from (select ts.sb_bumen,ts.sb_leixing,ts.nb,ts.dy,ts.fy,ts.cz from shebei_ts as ts UNION ALL select nb.sb_bumen,nb.ts,nb.sb_leixing,nb.dy,nb.fy,nb.cz from shebei_nb as nb) as tn union all select dy.sb_bumen,dy.ts,dy.nb,dy.sb_leixing,dy.fy,dy.cz from shebei_dy as dy) as tnd union all select fy.sb_bumen,fy.ts,fy.nb,fy.dy,fy.sb_leixing,fy.cz from shebei_fy as fy) as tndf union all select cz.sb_bumen,cz.ts,cz.nb,cz.dy,cz.fy,cz.sb_leixing from shebei_cz as cz]. AS tndfc
- ORDER BY tndfc.sb_bumen;
复制代码
[ 本帖最后由 南网情深 于 2007-10-26 00:42 编辑 ] |
|