Search
 
SCRIPT & CODE EXAMPLE
 

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 $$;
Comment

PREVIOUS NEXT
Code Example
Sql :: mysql show all table from database 
Sql :: sql select last id 
Sql :: avg mysql 
Sql :: string to sql timestamp 
Sql :: mysql regexp_replace remove html tag 
Sql :: oracle first row 
Sql :: create index mysql 
Sql :: oracle pagination query rownum 
Sql :: sql calculate working days between two dates excluding weekends and holidays 
Sql :: mysql email validation 
Sql :: zsh-syntax-highlighting zsh-autosuggestions 
Sql :: mysql auto increment after delete 
Sql :: read all columns of a table sql 
Sql :: mysql record group by created date count 
Sql :: plpgsql create function 
Sql :: sql all columns 
Sql :: check if has alpha characters sql 
Sql :: oracle to_char number format percentage 
Sql :: Select without null values sql 
Sql :: mysql add column to table 
Sql :: mysql update column to be nullable 
Sql :: how to know the character set of an oracle databes 
Sql :: Add a column with a default value to an existing table in SQL Server 
Sql :: postgre alter table foreign key 
Sql :: postgresql get date from datetime 
Sql :: sql format time 
Sql :: sql cast 
Sql :: sql count total by foreign key 
Sql :: get count of null in column sql 
Sql :: mysql: command not found 
ADD CONTENT
Topic
Content
Source link
Name
3+7 =