本人在前台,输入客户信息,但是存储过程中要插到主子表中,请教我怎么样把主表(只插入客户名和密码)然后把别的信息插到子表里面,请教我怎么把主表ID号和余下客户信息查到子表里面,大家能否帮忙解决下
------解决方案--------------------
create proc up_t1(@cust_id int)
as
insert into 主表
select 客户名,密码 from 客户信息 where [email protected]_id
insert into 从表
select ID,名称,... from 客户信息 where [email protected]_id