DELIMITER //

CREATE PROCEDURE ValidateUser (
    IN mobile_number VARCHAR(20)
)   
BEGIN
    DECLARE user_count INT;
    DECLARE user_exists BOOLEAN;  
    SELECT COUNT(*) INTO user_count FROM Users WHERE Mobile = mobile_number;    
    
    IF user_count > 0 THEN
        SET user_exists = TRUE;
    ELSE
        SET user_exists = FALSE;
    END IF;
    
    SELECT user_exists;
END

DELIMITER ;