有三个表
employee表
employeeId(主键)
employeeName
==============
date 表
dateId(主键)
dateName
====================
aa 表
employeeID(主键)
dateID(主键)
aaString
---------------------
如果我有一个三个参数employeeName,dateName,astrings,
怎么插入aa表里?
需要调出 employeeID,dateID,还要加入astrings~
------解决方案--------------------
insert into aa select employeeId = (select employeeId from employee where employeeName = @employeeName),
dateID = (select dateID from date where dateName = @dateName),
aaString = @astrings