这里涉及三个表,AA,BB,CC,将AA的数据更新到CC表中,将AA中LABEL_ID分别截取字段与BB表中的label_id对应查询到LABEL_NAME作为CC表的一个字段插入,这里分成四段查询 insert into CC select T.apmac,T1.LABEL_NAME,T2.LABEL_NAME,T3.LABEL_NAME,T4.LABEL_NAME,T.LABEL_ID,'杭州' from(select a.AP_MAC as apmac,a.LABEL_ID ,substr