Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

How to save PostgreSQL query

create or replace function count_app_users()
    returns table
            (
                total bigint
            )
    language plpgsql
as
$$
begin
    return query (
      select count(*) from app_user
    );
end;
$$;
Source by learn.coderslang.com #
 
PREVIOUS NEXT
Tagged: #How #save #PostgreSQL #query
ADD COMMENT
Topic
Name
6+4 =