table_a 有(sys_id,id, name,sex,age)属性 sys_id 自增长 primary key
table_b 有 (sys_id,id ,name,sex,age,note)属性,空表把table_a 插入 table_b中要插入table_b,为table_a,的id = ‘1’的内容,并且 set note =‘test’已知到 insert table_b(id ,name ,sex ,age ) select (id ,name ,sex ,age ) from table_a where id = '1'那么 要怎么同时插入 note ,或者还有其他什么办法
table_b 有 (sys_id,id ,name,sex,age,note)属性,空表把table_a 插入 table_b中要插入table_b,为table_a,的id = ‘1’的内容,并且 set note =‘test’已知到 insert table_b(id ,name ,sex ,age ) select (id ,name ,sex ,age ) from table_a where id = '1'那么 要怎么同时插入 note ,或者还有其他什么办法
insert table_b(id ,name ,sex ,age.'' ) select (id ,name ,sex ,age ) from table_a where id = '1'
先插入''到note列
看错了,不是1,是testinsert into table_b(id ,name ,sex ,age ) select id ,name ,sex ,age , note = 'test' from table_a where id = '1'
select sys_id,id,name,sex,age,note,'test'
from table_a
where id = '1'
orinsert into table_b(sys_id,id,name,sex,age,note)
select sys_id,'1',name,sex,age,note,'test'
from table_a
where id = '1'