Hızlı yanıt: kod örneği
stackoverflow.com oracle-what-does-execute-immediate-mean
It is for running native dynamic SQL.For DML you'd use it when running statements that you don't have available at compile time, e.g. if the column list is based on a selection from the user.In your case it's being used because DDL cannot be run as static SQL from within PL/SQL. Only certain query, DML and TCL commands are valid. Anything else has to be treated as dynamic.I'd say it's rare to need to use DDL from a PL/SQL block. might be reasonable; if you find anything creating or dropping objects on the fly then that might be more of a concern as it can suggest a suboptimal data model. itself does not automatically commit; but if you execute DDL then that will behave the same as if you ran it outside PL/SQL, so it will commit in your case, yes.Incidentally, I'm not sure why your code is using an intermediate variable to hold the statement; that's useful if you want to display what it's going to run maybe, but you don't seem to be doing that. What you have could be done as:i.e. without using at all.
TRUNCATE
EXECUTE IMMEDIATE
EXECUTE IMMEDIATE 'TRUNCATE TABLE BD_BIDS_EXT_DET';
V_SQL_1