Rahmadnet

add stored procedure

Aug 31st, 2019
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. CREATE OR REPLACE FUNCTION totalRecords ()
  2. RETURNS INTEGER AS $total$
  3. DECLARE
  4.     total INTEGER;
  5. BEGIN
  6.     SELECT COUNT(*) INTO total FROM ht_salarycomponent;
  7.     RETURN total;
  8. END;
  9. $total$ LANGUAGE plpgsql;
  10.  
  11. SELECT totalRecords();
Advertisement
Add Comment
Please, Sign In to add comment