Welcome to plsql4all.blogspot.com SQL, MYSQL, ORACLE, TERADATA, MONGODB, MARIADB, GREENPLUM, DB2, POSTGRESQL.

Friday, 7 November 2014

Create Macro in Teradata

A macro allows us to name a set of one or more statements and execute it as a group.

The syntax of creating Macro is:-

CREATE MACRO MACRO_NAME AS
(
 SQL_STATEMENTS;
) ;

Sample Macro is:-

CREATE MACRO MY_MACRO AS
(
SELECT * FROM PROD.EMPLOYEE;
) ;


No comments:

Post a Comment

Please provide your feedback in the comments section above. Please don't forget to follow.