T1结构Code, Value,  iType
T2结构Code,Value
要求将T2中某些满足条件的记录复制到T1中,并将iType的字段符值

解决方案 »

  1.   

    楼主,你这个需求描述的太模糊了,满足条件的记录,是满足什么条件;iType的值要设置什么?
      

  2.   

     Insert into T1(Code,Value,iType) select * from T2 where Value >100  iType为int  
      

  3.   

    iType为int是说iType的类型为int,还是值死int啊??
      

  4.   

    insert into T1 select Code, Vaule, cast(100 * rand() as signed) from T2
      

  5.   

    insert into t1 select code,value,1 as iType from t2 where code=123