Revising the Select Query I

  • + 0 comments

    SET SERVEROUTPUT ON DECLARE CURSOR ISHI IS SELECT * FROM CITY WHERE POPULATION>=100000 AND COUNTRYCODE='USA'; DIS CITY%ROWTYPE; BEGIN OPEN ISHI; LOOP FETCH ISHI INTO DIS; EXIT WHEN ISHI%NOTFOUND; DBMS_OUTPUT.PUT_LINE(DIS.ID||' '||DIS.NAME||' ' ||DIS.COUNTRYCODE||' '||DIS.DISTRICT||' '||DIS.POPULATION); END LOOP; CLOSE ISHI; END; /