Rahmadnet

PL/pgSQL IF statement

Jul 29th, 2019
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. do $$
  2. declare
  3.     x integer := 50;
  4.     y integer := 50;
  5. begin
  6.     if x > y then
  7.         raise notice '% is greater than % ', x, y;
  8.     elseif x < y then
  9.         raise notice '% is lees than %',x, y;
  10.     else
  11.         raise notice '% is equal to %', x, y;
  12.     end if;
  13. end $$;
Advertisement
Add Comment
Please, Sign In to add comment