我试图在下面的存储过程中“联合”多个选择语句
Create or replace PROCEDURE procedure1
as
BEGIN
SELECT b.EntityName,
c.StateLaneName,
c.ConsiderEntityOwnership,
a.InitialState,
d.StateName,
e.EventName,
1 AS Discriminator,
NULL AS TransitionSeq,
NULL AS TransitionName,
k.WorkflowActionSeq AS ActionSeq,
l.ActionName AS ActionName,
l.ClassPath AS ClassPath,
NULL AS MessageKey,
NULL AS NextStateName
FROM Workflow a,
Entity b,
WorkflowStateLane c,
WorkflowState d,
WorkflowEvent e,
WorkflowEventAction k,
WorkflowAction l
WHERE a.WorkflowEntityId = b.EntityId
AND a.WorkflowStateLaneId = c.WorkflowStateLaneId
AND a.WorkflowStateId = d.WorkflowStateId
AND a.WorkflowEventId = e.WorkflowEventId
AND a.WorkflowId = k.WorkflowId
AND k.WorkflowActionId = l.WorkflowActionId
AND k.TransitionActionType = 1
UNION
(SELECT b.EntityName,
c.StateLaneName,
c.ConsiderEntityOwnership,
a.InitialState,
d.StateName,
e.EventName,
2 AS Discriminator,
NULL AS TransitionSeq,
NULL AS TransitionName,
k.WorkflowActionSeq AS ActionSeq,
l.ActionName AS ActionName,
l.ClassPath AS ClassPath,
NULL AS MessageKey,
NULL AS NextStateName
FROM Workflow a,
Entity b,
WorkflowStateLane c,
WorkflowState d,
WorkflowEvent e,
WorkflowEventAction k,
WorkflowAction l
WHERE a.WorkflowEntityId = b.EntityId
AND a.WorkflowStateLaneId = c.WorkflowStateLaneId
AND a.WorkflowStateId = d.WorkflowStateId
AND a.WorkflowEventId = e.WorkflowEventId
AND a.WorkflowId = k.WorkflowId
AND k.WorkflowActionId = l.WorkflowActionId
AND k.TransitionActionType = 2);
END proceure1;
编译时出现错误 PLS-00428:此选择函数中应有 INTO 子句。我是甲骨文的新手。请帮我。