我有一个工作存储过程代码,它从 SAMPLE 数据库中调用一个表。但是我现在的问题是我对如何将其制作成流程图感到困惑,因为条件在 SELECT 语句本身内。
CREATE PROCEDURE TAXDUE ()
DYNAMIC RESULT SETS 1
LANGUAGE SQL
BEGIN
DECLARE display CURSOR WITH RETURN TO CLIENT FOR
SELECT EMPNO, LASTNAME, SALARY,
CASE
WHEN SALARY < 15001 THEN SALARY
WHEN SALARY BETWEEN 15001 AND 22000 THEN SALARY * 0.05
WHEN SALARY BETWEEN 20001 AND 32000 THEN (SALARY * 0.07) + 125
WHEN SALARY BETWEEN 32001 AND 45000 THEN (SALARY * 0.10) + 200
ELSE SALARY
END AS "TAX DUE"
FROM EMPLOYEE
WHERE WORKDEPT IN ('A00', 'B01', 'C01');
OPEN display;
END
我如何将其布局到流程图中?我可以想象它从来没有尝试过用包含条件的 SELECT 语句制作流程图。