Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Oracle Database XE 11gR2 Jump Start Guide
  • Table Of Contents Toc
Oracle Database XE 11gR2 Jump Start Guide

Oracle Database XE 11gR2 Jump Start Guide

By : Asif Momen
4.3 (3)
close
close
Oracle Database XE 11gR2 Jump Start Guide

Oracle Database XE 11gR2 Jump Start Guide

4.3 (3)
By: Asif Momen

Overview of this book

Oracle Database XE 11gR2 is an excellent beginner-level database and is a great platform to learn database concepts. "Oracle Database XE 11gR2 Jump Start Guide" helps you to install, administer, maintain, tune, back up and upgrade your Oracle Database Express Edition. The book also helps you to build custom database applications using Oracle Application Express.Using this book, you will be able to install Oracle Database XE on Windows/Linux operating system.This book helps you understand different database editions and it guides you through the installation procedure with the aid of screenshots. You will learn to interact with the database objects. You will gain a solid understanding of stored sub-programs which is followed by an introduction to Oracle Application Express (APEX). Solid database performance tuning strategies are also discussed in this book followed by backup and recovery scenarios. All in all, "Oracle Database XE 11gR2 Jump Start Guide" delivers everything that you should know to get started with Oracle Database administration.
Table of Contents (20 chapters)
close
close
Oracle Database XE 11gR2 Jump Start Guide
Credits
About the Author
Acknowledgement
About the Reviewers
www.PacktPub.com
Preface

Creating stored subprograms


You create a stored subprogram using the CREATE PROCEDURE command. In this section, let us create a sample stored procedure in the HR schema and name it salary_increment. The stored procedure does the following:

  1. 1. Accepts EMP_NO as input.

  2. 2. Fetches the current salary of the employee.

  3. 3. Calculates the increment on the salary.

  4. 4. If the salary is greater than 1000 then raise it by 2 percent. If the salary is between 501 and 999, increment it by 5 percent, and if the salary is less than or equal to 500, increment it by 10 percent.

  5. 5. Increment the salary of the given employee in the EMP table.

  6. 6. Commits the changes.

The following is a screenshot of a PL/SQL stored procedure:

At this point you should be able to successfully create the salary_increment procedure. Before we execute this procedure, let us make a note of the salary of "Tom Green" by querying the EMP table. The following screenshot shows the query:

From the query shown in the preceding screenshot, we know...

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Oracle Database XE 11gR2 Jump Start Guide
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon