For example, if I have a file called sample.sql containing the
following 2 queries and do "sql database1 < sample.sql", when do the
commit(s) happen? Can \p or \g imply a commit?
select * from parts;
select * from supplies;
Any comments are welcome.
thanks
Please read:- Appendix B Terminal Monitor, Ingres SQL Reference Guide.
The Ingres Documentation Set can be located at:-
http://www.cai.com/products/ingres/documentation_set.htm
\p - Print the query before executing
\g - Go - run the sql above
> For example, if I have a file called sample.sql containing the
> following 2 queries and do "sql database1 < sample.sql", when do the
> commit(s) happen? Can \p or \g imply a commit?
\g can "imply" a commit _iff_ you have autocommit on. Otherwise
commits only happen at the end of the script (if you don't have
a rollback first) or whereever you place a commit.
NB however that in a multi-statement script you have to be _very_
careful about what happens on Error.
There was a fairly in-depth discussion of this here some months
ago (check Deja).
--
<URL:http://www.pierrot.co.uk/> Team AMIGA
You'll be sorry.