This data doesn't make sense to what you have in these example tables. You have "Micro Processors" on the same entry line as "Digital Networks", but no indication how you actually got to this combined record. Given the datatable you have here, there is no logical way to create this mix of courses, as there is no definitive relationship between multiple courses in this table.
It looks like you are matching the first Sem1,channel1 with Sem2,Channel1, but this is an insufficient way to do this as you have multiple sem and multiple channel per sem. Since you MUST provide an order on your table, there is no guarantee as to the order of the records beyond that point. Typically it is by insertion order and you can force the order by the id, but if you change the data by removing, modifying or inserting anything, then it will cause a potential change in the ordering as it will not guarantee an implicit order.
Unless this doesn't matter at all? The only logical way with what you have here would result in records much like the following:
And so forth, repeated with the sem2 as well. I assume that this isn't what you want, so you'll need to come up with a way to actually relate one record to another.
Digital Networks, Micro Processors
Digital Networks, Electricals
Network Theory, Micro Processors
Network Theory, Electricals