Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PL/SQL Question using Brewbeans Database Chapter 5-3 Complete the following steps to create a procedure to calculate the tax on an order. The BB_TAX table

PL/SQL Question using Brewbeans Database Chapter 5-3

Complete the following steps to create a procedure to calculate the tax on an order. The BB_TAX table contains the states that require taxes to be submitted for Internet sales. If the state is not listed in the table, then no tax should be accessed on any order. The shopper's state and basket subtotal are the inputs into the procedure while the tax amount should be returned.

Create a procedure called TAX_COST_SP to accomplish the tax calculation task. Keep in mind that the state and subtotal values are inputs into the procedure and the procedure is to return the tax amount. Review the contents of the BB_TAX table, which contains the tax rate for each state that needs to be taxed.

Create a host variable named G_TAX to hold the value returned by the procedure.

Invoke the procedure using the values of "VA" for the state and $100 for the subtotal.

Display the tax amount returned by the procedure (it should be $4.5).

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Students also viewed these Databases questions