有两张表 一个张表stuInfo有studenNo,studentName,studentSex,studentBirthDate ,course1,course2,course3 等字段
另一张表 studentImage有 studentNo,studentPhoto 等字段.
一个页面里有一些数据,要分别插入这两张表里,其中stuInfo.studentNo=studentImage.studentNo 的,那一条insert 语句要怎么写?
另一张表 studentImage有 studentNo,studentPhoto 等字段.
一个页面里有一些数据,要分别插入这两张表里,其中stuInfo.studentNo=studentImage.studentNo 的,那一条insert 语句要怎么写?
as
begin
insert studentImage select * from 你的页面数据表--或者VALUES 语法插入
INSERT stuInfo SELECT ...
END先插入明细表,再插入主表