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

Friday, 7 November 2014

Parameterize Macro in Teradata

We can have parameterized Macro in Teradata as:-

CREATE MACRO MY_MACRO(PAR_EMP_NO INTEGER) AS
(
SELECT *  FROM PROD.EMPLOYEE
WHERE EMP_NO=PAR_EMP_NO;
);


To execute parameterized Macro:-

EXEC MY_MACRO(10);


No comments:

Post a Comment

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