ibatis 嵌套insert select语句

从dsp_subject 表查询若干记录,与其他记录‘somedesc’ 合并作为一条记录,插入到表dsp_hstry中


insert into dsp_hstry (sub_no,editer_no,edit_date,clasy,version,edit_des)
(select no,cre_no,cre_date,clasy,version,'somedesc'
from dsp_subject where no = 1);

注:语法是 

insert into table1(a,b,c)(select a,b,"something" from table2)



你可能感兴趣的:(c,Date,ibatis,table,insert)