Question in PL/SQL: You want to determine how many of a particular item can be p
ID: 3762044 • Letter: Q
Question
Question in PL/SQL: You want to determine how many of a particular item can be purchased given the amount you have to spend. Clearly you need to establish the item price and how much you have to spend. The result on the screen should tell how many of that item you can purchase.Would I have to create a new table to achieve this
Step by step please, like if I had to start fresh Question in PL/SQL: You want to determine how many of a particular item can be purchased given the amount you have to spend. Clearly you need to establish the item price and how much you have to spend. The result on the screen should tell how many of that item you can purchase.
Would I have to create a new table to achieve this
Step by step please, like if I had to start fresh
Would I have to create a new table to achieve this
Step by step please, like if I had to start fresh
Explanation / Answer
Let us assume that we have an item A whose price is 100. Ask the user for the amount he/she has with him/her.
Let the total amount be represented as TotalAmount , and Price Of Item A be PriceOfItemA.
SELECT ((TotalAmount / (PriceOfItemA)) FROM DUAL
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.