Create Table testpo
(
poid Varchar2(10),
ToDelete Varchar2(10)
);
Insert into testpo values (‘PO1’, ‘D’);
Insert into testpo values (‘PO1’, ‘N’);
Insert into testpo values (‘PO2’, ‘D’);
Insert into testpo values (‘PO3’, ‘D’);
我想创建一个存储过程来返回唯一的POID,但是如果同一POID有D和N,我只需要IsDelete=N的行
需要的输出:
PO1 N
PO2 D
PO3 D