Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Is it a good pratice to use only DML in PL/SQL scripts?
In article <8nioo5$8rd5b$1_at_ID-41926.news.cis.dfn.de>,
"Dino Hsu" <dino1_at_ms1.hinet.net> wrote:
> Dear all,
>
> I am a PL/SQL newbie. I know that DDL and DML can both be used in a
PL/SQL,
> but I observed some PL/SQL scripts in some application systems, I
found that
> only DML are used in PL/SQL scripts. In other words, schema objects
are all
> created beforehand. I wonder whether it is a good practice to use
only DML
> in PL/SQL scripts in application or reporting systems. Thanks in
advance.
>
Yes, I think that's good practice, mostly because I try to keep by PL/SQL code transaction based. That is, one procedure is one transaction that, in the end, is committed or rolled back. A DML statement does an implicit COMMIT, so it makes the procedure a little more difficult to manage. Of course, sometimes, you have to do a DML in your code. I would just try to minimize those situations.
Salaam
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Fri Aug 18 2000 - 12:26:17 CDT
![]() |
![]() |