sql语句!select left join 2表取数据想将取出数据插入新表!急!
sql语句如下,
select distinct cd_psn1,cus_comp_info.com_cn from ser_emp_duty left join cus_comp_info on cus_comp_info.com_no = ser_emp_duty.com_no
新表为custom_name //两列为custom_name and com_cn
将上述语句导入到此新表的两列中
求大神!求具体写法
------解决方案--------------------insert newtable(custom_name, and com_cn)
select distinct cd_psn1,cus_comp_info.com_cn from ser_emp_duty left join cus_comp_info on cus_comp_info.com_no = ser_emp_duty.com_no
------解决方案--------------------insert into custom_name(custom_name and com_cn)
select distinct cd_psn1,cus_comp_info.com_cn
from ser_emp_duty
left join cus_comp_info on cus_comp_info.com_no =ser_emp_duty.com_no