Posts

Showing posts from May, 2021

RETURNING and RETURNING INTO Clause with EXECUTE IMMEDIATE

  EXECUTE IMMEDIATE dynamic_query [ INTO user_defined_variable_1 , user_defined_variable_2 , .. ] [ USING bind_argument_1 , bind_argument_2 , .. ] [ RETURNING | RETURN-INTO clause ] ;     CASE_1 : NO Value Returning CASE_2 : Returning Single Row with Single Column Value CASE_3 : Returning Single Row with More Than One Column Value CASE_4 : Returning Multiple Row with Single Column Value CASE_5 : Returning Multiple Row with More Than One Column Value     --===================================================     • If the dynamic SQL statement is a "DML statement" without a "RETURNING INTO" clause , other than SELECT, put all bind variables in the "USING" clause . --===================================================   DROP Sequence XX_ROLL_No   DROP TABLE XX_TEMP_TL   Create Sequence XX_ROLL_No Start with 1000   create table XX_TEMP_TL ( Roll_NO   NUMBER ( 4 ), SUB_1      NUM