Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

do block in postgresql

do $$ 
<<first_block>>
declare
  film_count integer := 0;
begin
   -- get the number of films
   select count(*) 
   into film_count
   from film;
   -- display a message
   raise notice 'The number of films is %', film_count;
end first_block $$;
Code language: PostgreSQL SQL dialect and PL/pgSQL (pgsql)
Source by www.postgresqltutorial.com #
 
PREVIOUS NEXT
Tagged: #block #postgresql
ADD COMMENT
Topic
Name
6+8 =