Skip to content

Instantly share code, notes, and snippets.

@abrarShariar
Created July 20, 2018 18:13
Show Gist options
  • Save abrarShariar/cf3d1fbfd338e1a1cf940b332a2ab441 to your computer and use it in GitHub Desktop.
Save abrarShariar/cf3d1fbfd338e1a1cf940b332a2ab441 to your computer and use it in GitHub Desktop.
pl/pgsql sample code
DO $$
DECLARE
rec RECORD;
BEGIN
FOR rec IN SELECT * FROM transaction_status WHERE transaction_id = 31
LOOP
RAISE NOTICE '%', rec.status_msg;
END LOOP;
END;
$$ LANGUAGE plpgsql;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment