Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

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

JDBC Database Programming With J2ee

Authors: Art Taylor

1st Edition

0130453234, 978-0130453235

More Books

Students also viewed these Databases questions

Question

5. How do you expect to use active listening during the meeting?

Answered: 1 week ago

Question

what is called authorised to handle media queries and requires

Answered: 1 week ago