DECLARE
CUSTID NUMBER; ANO NUMBER; BALANC NUMBER; TYP ACCOUNT.TYPE%TYPE; STATU ACCOUNT.STATUS%TYPE;
CURSOR S IS SELECT * FROM ACCOUNT WHERE STATUS = 'active';
BEGIN
OPEN S;
FOR A IN 1..3 LOOP
FETCH S
DBMS_OUTPUT.PUT_LINE('CUST ID : '||CUSTID||' NO:'||ANO || ' TYPE :' || TYP || ' STATUS :' || STATU);
END LOOP;
CLOSE S;
END;
i'm trying to find 3 maximum balance on ACCOUNT table but it doesn't work !
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…