I have 3 tables (Users, CourseUsers and Courses which represent the courses assigned to a single user).
I would like to create a procedure which, as soon as I create a new course, will assign this course to every user. What I see I need here is a For each loop to iterate through every user inserting a new row in CourseUsers table
How do I create a loop in SQL?
You don’t need a loop.