Wie verwenden von goto label in MySQL gespeichert-Funktion

Möchte ich springen, in MySQL gespeicherte Funktion.
Wie kann ich das nutzen?
Beispiel-code:

if (action = 'D') then
    if (rowcount > 0) then
        DELETE FROM datatable WHERE id = 2;      
    else
       SET p=CONCAT('Can not delete',@b);
       goto ret_label;
    end if;
end if;

Label: ret_label;
return 0;

InformationsquelleAutor SuSanda | 2012-06-21

Schreibe einen Kommentar