select * from tbl_student_courses where studentID = myID
insert into tbl_student_courses values (@myID,@otherdata)
update tbl_student_courses set (otherdata=@myOtherdata) where studentID = myID
Hard to tell how to help you since you didn't give us your database schema. These are some standard, non-specific examples that hopefully you may learn from.