there is no error but also doesn't show success
at first, it shows on only table registrations and not the registration_details, and now doesn't appear in both table.
set foreign_key_checks = 0;
drop procedure if exists createRegist;
delimiter //
create procedure createRegist()
begin
    declare total_credit float;
    declare registration_id INT;
    declare credit float;
    
    -- create first registration for student 1
    set total_credit = 0;
    insert into `student_regist`.`registrations` (`registration_id`, `student_id`,`total_credit`)
        values (1, 1, total_credit);
    
SELECT LAST_INSERT_ID() INTO registration_id;
     
    -- create registration detail 1
SELECT 
    `student_regist`.`courses`.`credit`
INTO credit FROM
    `student_regist`.`courses`
WHERE
    `student_regist`.`courses`.`course_id` = 1
LIMIT 1;
    set total_credit = total_credit + credit;
    insert into `student_regist`.`registration_details` (`registration_details_id`, `registration_id`, `course_id`, `semester`) 
        values (1, 1, 1, 1);
    SELECT 'Success';
end//
delimiter ;
 
     
    