Thursday, October 29, 2009

Chapter 21.  I/O and PL/SQL









Chapter 21. I/O and PL/SQL


Many, perhaps most, of the PL/SQL programs we write need to interact only with the underlying Oracle RDBMS using SQL. However, there will inevitably be times when you will want to send information from PL/SQL to the external environment, or read information from some external source (screen, file, etc.) into PL/SQL. This chapter explores some of the most common mechanisms for I/O in PL/SQL, including the following built-in packages:



DBMS_OUTPUT


For displaying information on the screen


UTL_FILE


For reading and writing operating system files


UTL_MAIL and UTL_SMTP


For sending email from within PL/SQL


UTL_HTTP


For retrieving data from a web page


It is outside the scope of this book to provide full reference information about the built-in packages introduced in this chapter. Instead, in this chapter, we'll demonstrate how to use them to handle the most frequently encountered requirements. Check out Oracle's documentation for more complete coverage. You will also find Oracle Built-in Packages (O'Reilly) a helpful source for information on some of the older packages; we have put several chapters from that book on this book's web site.









    No comments:

    Post a Comment