Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Home Work2 Q1: Assume that you have a table Numbers. The table schema is : Numbers(Value Number(4), Status Varchar2(30)) A. Write a PL/SQL program to
Home Work2 Q1: Assume that you have a table Numbers. The table schema is : Numbers(Value Number(4), Status Varchar2(30)) A. Write a PL/SQL program to insert the numbers from 500 to 300 using While. Each time, the number is decremented by 5. In the status, write "Yes" if the number ends with 0, otherwise, write "No". Q3. Consider the following code, which is supposed to print the numbers from 100 to 1. B. Answer the same question using For loop. DECLARE V count NUMBER(3) = 100; BEGIN WHILE v. count=1 DBMS_OUTPUT.PUT_LINE(v.count); END Loop; End; 1. The code has four mistakes. Rewrite the code after fixing them. Q2: Assume that you have a table Amman Temperature which contains the temp values for the city of Amman in one year. The table details are: (Temp. Number(3), Day Date). 2. Write the code using FOR loop. Write a PL/SQL block that uses explicit cursor to print statistics about this table as follows: Number of Tempreaturs from 30 to 40 is ... Number of Tempreaturs from 20 to 30 is ... Number of Tempreaturs from 10 to 20 is ... Number of Tempreaturs Less than 10 is
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started