Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

function in postgresql

CREATE OR REPLACE FUNCTION totalRecords ()
RETURNS integer AS $total$
declare
	total integer;
BEGIN
   SELECT count(*) into total FROM COMPANY;
   RETURN total;
END;
$total$ LANGUAGE plpgsql;
Source by www.tutorialspoint.com #
 
PREVIOUS NEXT
Tagged: #function #postgresql
ADD COMMENT
Topic
Name
6+3 =