Skip to content
Snippets Groups Projects
Commit 1b3cf9eb authored by Clemens Kupke's avatar Clemens Kupke
Browse files

lab1monday

parent 034f9b64
No related branches found
No related tags found
No related merge requests found
CREATE OR REPLACE FUNCTION add_population() RETURNS <ENTER> AS
CREATE OR REPLACE FUNCTION max_population() RETURNS <ENTER> AS
$$
DECLARE
popul <ENTER>;
total <ENTER>;
maxpop <ENTER>;
c_pop CURSOR FOR <ENTER>;
BEGIN
total = 0;
maxpop = 0;
OPEN c_pop;
LOOP
FETCH c_pop INTO popul;
EXIT WHEN NOT FOUND;
total = total + popul;
maxpop = GREATEST(maxpop,popul);
END LOOP;
CLOSE c_pop;
RETURN total;
RETURN maxpop;
END;
$$
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment