How to write SAP HANA Dynamic SQL Query Examples
Examples:
CREATE PROCEDURE DYNAMIC_QUERY1(IN TABLE_NAME VARCHAR(20))
AS
BEGIN
DECLARE QUERY VARCHAR(200);
QUERY:='SELECT * FROM ' || :TABLE_NAME ;---Preparing Statement
execute immediate(:QUERY);---Execute the SQL Statement
END