Returning Procedure Results in Parameters

Procedures return results to the calling environment.

Procedures return results in one of the following ways:

See SQL Anywhere 11.0.1 > SQL Anywhere Server - SQL Usage > Stored Procedures and Triggers > Using procedures, triggers, and batches > Introduction to procedures > Returning procedure results in parameters.

Sybase IQ example

Note:

For examples, use the Sybase IQ demo database iqdemo.db.

CREATE PROCEDURE SalaryList (IN department_id INT)
RESULT ( "Employee ID" INT, "Salary" NUMERIC(20,3) )
BEGIN
			SELECT EmployeeID, Salary
			FROM Employees
			WHERE Employees.DepartmentID = department_id;
END