Return inserted entity in mysql stored procedure I want to have inserted data in stored procedure, because of of sql injection I use prepare and execute statement.
what should I've done to have the inserted data

following code is only a part of user table

DELIMITER ;;
CREATE PROCEDURE `UserCreate`
(
    IN `@Name`      VARCHAR(32)
)
BEGIN
    SET @Query = CONCAT
    (
        'INSERT INTO
            User
            (
                Name      
            VALUES
            ('
                , '\'' , `@Name` , '\','
            ')'
    );

    PREPARE Statement FROM @Query;
    EXECUTE Statement;
    DEALLOCATE PREPARE Statement;

END ;;
DELIMITER ;


I use Binary uuid for having more security
That's not using &quot;prepare&quot; to do the escaping.  Put the IN parameter in the EXECUTE.

Please don't name parameters with @ -- it is too confusing with @variables.  I like to prefix in args with _.

A UUID is 36 characters; The binary equivalent is BINARY(16).  Your VARCHAR(32) does not agree with &quot;I use Binary uuid for having more security&quot;.