Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Create a view using OUT values from a procedure - how?
In article <9711ade0.0410080421.36960303_at_posting.google.com>, fitzjarrell_at_cox.net (David Fitzjarrell) wrote:
> ... but how
>difficult can it be to return the max() and min() grades for a given
>student? Especially when all you're using is the student id to
>retrieve them?
For that matter, given the simplicity of the SQL involved so far, how difficult can it be to just use inline views to avoid a context change in the first place? Why involve functions at all?
create view student.v_grades
as
select s.student, s.studentid,
(select max(grade) from studentdb h where h.studentid = s.studentid) highgrade, (select min(grade) from studentdb l where l.studentid = s.studentid) lowgradefrom studentdb s