日期:2014-05-16  浏览次数:20774 次

MYSQL中新增一条记录时,字段值得处理方法
打个比方
insert into tableA
(Id,Name)values
(值1,值2)
值1是传的参数,ID只是个比方..
值2是tableB中字段的值

求写法

不好描述的话,像我这样把写法体现出来就行,谢谢了~

------解决方案--------------------
insert into tableA
select @t,zhi2 from tableB;
------解决方案--------------------
insert into tableA
(Id,Name)
select @参数,值2 from tableB where id=3