Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- create or remplace function getMoyQuantiteClient(un_ncli clients ncli%type)
- returns decimal(10.2) As
- $$
- declare
- moy decimal(10.2);
- Begin
- Select AVG(qa) into moy from achat
- where ncli = un_ncli;
- return moy;
- end
- $$ language plpgsql;
- -- select getMoyQuantiteClient(101);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement