日期:2014-05-17 浏览次数:20893 次
create table pm_obj(id varchar(10), name varchar(10), type varchar(10)) create table pm_score(id varchar(10), xdesc varchar(10), score varchar(10)) create table pm_sub_element(subid varchar(10), ele_type varchar(10), ele_id varchar(10)) insert into pm_obj values ('1001', 'sms', 's'); insert into pm_obj values ('1002', 'tnt', 't'); insert into pm_score values ('6550', 'aaa', '2500'); insert into pm_score values ('6551', 'ccc', '3000'); insert into pm_sub_element values ('1', '5', '1001'); insert into pm_sub_element values ('1', '6', '6550'); select a.name, a.type from pm_obj a, pm_sub_element c where c.subid = '1' and c.ele_type = '5' and c.ele_id = a.id union select b.xdesc, b.score from pm_score b, pm_sub_element c where c.subid = '1' and c.ele_type = '6' and c.ele_id = b.id 抛砖引玉...