SQL> set serveroutput on
SQL> @c:\seit\abc.sql;
SQL> DECLARE
2 Cursor ecursor is select ename,sal from emp order by sal desc;
3 name emp.ename%type;
4 sal emp.sal%type;
5 BEGIN
6 open ecursor;
7 DBMS_OUTPUT.put_line('top 5 paid employees');
8 For I In 1..5
9 Loop Fetch ecursor into name,sal;
10 DBMS_OUTPUT.put_line(name);
11 DBMS_OUTPUT.put_line(sal);
12 End loop;
13 END;
14 /
top 5 paid employees
KING
5000
SCOTT
3000
FORD
3000
JONES
2975
BLAKE
2850
PL/SQL procedure successfully completed.
Subscribe to:
Post Comments (Atom)
Lecture PPTs of MIS , Module 4 to Module 6
Module 4 Social Computing (SC): Web 3.0 , SC in business-shopping, Marketing, Operational and Analytic CRM, E-business and E-commerce B2B B...
-
Practical exam Q No. 1 Q-1> Write a query in sql to create a table employee and department. Employee(empno,ename,deptno,job,hiredate...
-
3.3 Characteristics of Tasks and Interactions The various decomposition techniques described in the previous section allow us to identify ...
-
Cloud Computing Lab Lab No. 5 Explore Storage as a service using own Cloud for remote file access using web interfaces. ownClou...
No comments:
Post a Comment