Tablename as Parameter in stored function

Martin S. blackfin at elfenherz.de
Thu Oct 18 08:54:21 CDT 2007


How can I pass a table name into a stored procedure?

This is my function:

CREATE FUNCTION NextAutoID(inValue string)
RETURNS ULONG
begin
    DECLARE max_autoid ULONG ;
    select MAX(AutoID) INTO max_autoid from  inValue ;
    RETURN max_autoid + 1 ;
end;


but I get this error:
error: Table "inValue" not found.


More information about the Valentina mailing list