-
Hi Friends ,
Can We use group by caluse in select query
in PL/SQL Procedure ? Any example will be appreciated .
Thanks
Jayesh
-
The problem lies in what to do with the multiple results implied by this question. If you want to use a cursor and group, then fetch, no problem. If you merely want to group and select into, then what happens when you return multiple results? You can execute that select, but it could very well generate errors often.
What do you want to do?
Oracle DBA and Developer
-
an example where u can use a group by clause in a pl/sql block
declare
cursor c1 is
select sum(sal) sal,deptno from emp
group by deptno;
a c1%rowtype;
begin
for i in c1 loop
dbms_output.put_line(i.sal||' '||i.deptno);
end loop;
end;
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|