All Forums Tools
kiranparsha 16 posts Joined 04/09
26 Jun 2009
Differences between Macro and Stored procedue

Hi,Can any one please tell me the differences between a Macro and Stored procedue as both contains set of sql statements.Regards,kiran

Adeel Chaudhry 773 posts Joined 04/08
28 Jun 2009

Hello,Following are few differences between MACRO and Stored-Procedure:MACRO:- Limited procedural logic- Can return multi row answer sets for the same request- Multi-statement request parallelizes multiple single row statements- Can EXPLAIN a macro- Can be invoked by a triggerStored Procedure- Sophisticated procedural logic - Returns a single set of values (Before Teradata 12)- One request per individually processed statement- Cannot EXPLAIN a stored procedure. Instead, must EXPLAIN each individual stored procedure SQL statement individually- Cannot be invoked by a triggerHTH!Regards,Adeel

-- If you are stuck at something .... consider it an opportunity to think anew.

You must sign in to leave a comment.