ALTER TABLE `studentcourses` ADD FOREIGN KEY (StudentId) REFERENCES students(id); ALTER TABLE `studentcourses` ADD FOREIGN KEY (CourseId) REFERENCES courses(id); ...
ALTER TABLE staging_data ALTER COLUMN extra_info SET DEFAULT 'hello'; -- also note that for big tables on busy DBs the above 2-step form is much preferred over below form as it won't re-write the ...