which one is better
krishnarjun rao, November 29, 2018 - 1:54 pm UTC
hi Tom,
My main question is which one is better -
execute immediate
or
dbms_sql
Since execute immediate is new one and intuitive I think
it is better than old dbms_sql. Please clarify my doubt.
Thanks in advance.
November 30, 2018 - 6:17 am UTC
Not a case of "better" but "different".
My mantra generally is:
If I can get away with 'execute immediate' I will do so. The code is typically cleaner and easier for the next person who comes along to mantain it.
But there are some things that it can't do - like manage an unknown number of bind variables at compilation time. For things like that, I'll fall back to dbms_sql