Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

if else in postgresql

DO $$
DECLARE
   a integer := 10;
   b integer := 10;
BEGIN 
  IF a > b THEN 
     RAISE NOTICE 'a is greater than b';
  ELSIF a < b THEN
     RAISE NOTICE 'a is less than b';
  ELSE
     RAISE NOTICE 'a is equal to b';
  END IF;
END $$;
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #postgresql
ADD COMMENT
Topic
Name
6+9 =