I have two tables tbl_student it has studentId, studentName:
studentId | StudentName |
---|---|
1 | AA |
2 | BB |
3 | CC |
4 | DD |
secound table tbl_Subject it have Subject1,subject2,subject3
SubjectId | SubjectName |
---|---|
10 | Subject1 |
20 | Subject2 |
30 | Subject3 |
40 | Subject4 |
need to insert into another table student1 with all subject the table will be like
Id | studentId | SubjectId |
---|---|---|
1 | 1 | 10 |
2 | 1 | 20 |
3 | 1 | 30 |
4 | 1 | 40 |
5 | 2 | 10 |
6 | 2 | 20 |
7 | 2 | 30 |
8 | 2 | 40 |
and so on
I need to insert all record as bulk not as single record.
New contributor
Ahmed Farouk is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
3