01.09.2016 Views

Beginning Oracle Database 11g Administration From Novice to Professional

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CHAPTER 2 SQL AND PL/SQL 31<br />

<strong>to</strong>ol called SQL Developer was introduced in <strong>Oracle</strong> <strong>Database</strong> 9i, but the advantage of<br />

a command- line <strong>to</strong>ol such as SQL*Plus is that it can be used <strong>to</strong> au<strong>to</strong>mate tasks—that<br />

is, a series of SQL statements can be placed in a file and au<strong>to</strong>matically executed at prescribed<br />

times.<br />

The SQL*Plus utility can also be used as a simple report- writing <strong>to</strong>ol <strong>to</strong> produce<br />

neatly formatted reports. The commands in Listing 2-10 cause the entire Quote table <strong>to</strong><br />

be listed—notice the use of the clause <strong>to</strong> sort the data records retrieved by the<br />

SQL query. Listing 2-11 shows the output produced by the commands in Listing 2-10.<br />

Figure 2-4 shows the SQL Developer <strong>to</strong>ol, which I will have more <strong>to</strong> say about in<br />

Chapter 9.<br />

Listing 2-10. An SQL*Plus Program <strong>to</strong> Produce a Neatly Formatted Report

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!