I have 2 tables in SQL Server 2005
- tblEmployee (Emp_No INT, Emp_Name NVARCHAR(50)
- tblEducation (Edu_No INT, Edu_Name NVARCHAR(50), Emp_No)
Emp_No and Edu_No fields are auto increase number.
with relationship 1 to many
I want to create stored procedure to save data both tables in the same time.
Ex. Enter data
Emp_No Emp_Name
1 Jonh
Edu_No Edu_Name Emp_No
1 IT 1
2 Bussiness 1
3 Marketing 1
Please help. thanks.
If I understand you correctly, the following procedure will work: