Databases Reference
In-Depth Information
Your default Oracle installation may not have the user
SCOTT
enabled, or the pass-
word may have been changed from the default
TIGER
. Check with your local DBA to
see if this is the case.
table,
which contains a list of all the department numbers, department names, and
department locations. As you'll learn a little later in this chapter, the SQL
The user
SCOTT
owns a number of database tables, including the
DEPT
SELECT
statement allows you to extract information from a database. The exam-
ple below shows a
SELECT
statement that retrieves all of the rows in the
DEPT
table (
select * from dept;
) and its results.
Notice that the case of the keywords and column names is important only for
readability. In practice, you can enter them in any case. To enhance this sample
query, let's do the following:
Add a report title of “Department Report” using the
TTITLE
SQL*Plus
command.
Change the headers for each of the columns to make them more readable
using the
COLUMN
SQL*Plus command.
Save the output from the query to a file using the SQL*Plus
SPOOL
command.
Search WWH ::




Custom Search