我想在表格中插入记录" Cours_Change"但其中一个来自其他表" Devise&#34 ;; 我选择了Devises的听众,其ID也将被插入表格#34; Cours_Change"
insert into Cours_Change (DAT_JOUR_CCHN,mont_caba_cchn,mont_cabc_cchn,mont_cvba_cchn,mont_cvbc_cchn,cod_etat_cchn,cod_dev_dev, matricule_emp)
values ('01/05/2016',2.1,2.1,2.1,2.1,'V', select d.cod_dev_dev from table Devise d where d.lib_sigl_dev='AUS', 'emp_2' );
这张照片可能会让你明白我想做什么
你可以帮我吗答案 0 :(得分:0)
试试这个:
insert into Cours_Change (DAT_JOUR_CCHN,mont_caba_cchn,mont_cabc_cchn,mont_cvba_cchn,mont_cvbc_cchn,cod_etat_cchn,cod_dev_dev, matricule_emp)
select '01/05/2016',2.1,2.1,2.1,2.1,'V', d.cod_dev_dev, 'emp_2'
from Devise d where d.lib_sigl_dev='AUS'