Tutorials
Oracle 9i
Tutorial 2: SQL *Plus Commands
Using SQL *Plus to Work with Files
SQL Statement Examples
Using SQL *Plus for Storing Temporary Values
|
1. |
Enter the following SQL statement and observe the results: |
|
2. |
Describe the table S_EMP. Make note of what kind of information you see about the table. |
|
3. |
Use the SQL*Plus buffer editing command to edit your SQL statement so that it looks like this: |
|
4. |
Save your script to a file called emp_sal. |
|
5. |
Enter the following SQL statement and run it. When you are prompted for dept_id, enter the value 44. |
|
6. |
Customize the prompt for your statement: |
|
7. |
Using the select from exercise 4, customize the column headings so that the headings are in proper case, and columns with more than one word have split headings. |
|
8. |
Set a break on column dept_id. |
|
9. |
Compute the average salary and commission for each department. |
|
10. |
Add a title to the top of the report. Put the page number at the bottom. |
|
11.
|
Set the report to start a new page for each department id. Display the department id in the top title, and remove the dept_id column. |
|
12. |
Send the output of your report to a file called employee.txt. |
Next Page: Using SQL *Plus for Storing Temporary Values

|
hi i view the solution and output files it says "Forbidden You don't have permission to access /developers/articles/sqlplus_output1.html on this server." |