1 Reply Latest reply: Nov 6, 2013 6:12 PM by rp0428 RSS

    how to select in an if pl sql block

    user3160556

      Hi

      I want to do something like the followings

       

      DECLARE

           empcnt number ;

      BEGIN

           BEGIN

                select count(*)  into empcnt from employees where status = 'L';

            EXCEPTION

                 WHEN NO_DATA_FOUND THEN

                   empcnt := 0;          

           END;

           IF empcnt > 0 THEN

                select * from employees;

                ---dbms_output.put_line is not permitted

           END IF;

      END;

       

      I don't have permission to create object type or table either,   how can I do it?

       

      thanks