Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Working with loops and nested loops in the scope of an anonymous PL/SQL program, enter the unique elements of the Twelve Days of Christmas into

Working with loops and nested loops in the scope of an anonymous PL/SQL program, enter the unique elements of the Twelve Days of Christmas into collections and then print the lyrics of the song.

You need to write an anonymous block PL/SQL program that uses two collections. One collection implements a list of eight character variable length strings. The other collection implements a list of the following object type, which you need to create:

Object Type: STRUCT
Member Name Member Type
day_name VARCHAR2(8)
gift_name VARCHAR2(24)

The collection that implements a list of eight character variable length strings should contain:

first

second

third

fourth

fifth

sixth

seventh

eighth

ninth

tenth

eleventh

twelfth

The collection of the object type should include the unique elements of the lyrics, like:

and a Partridge in a pear tree

Two and Turtle doves

Three and French hens

Four and Calling birds

Five and Golden rings

Six and Geese a laying

Seven and Swans a swimming

Eight and Maids a milking

Nine and Ladies dancing

Ten and Lords a leaping

Eleven and Pipers piping

Twelve and Drummers drumming

All other values are repetitive strings. They should be embedded inside calls to the put_line function calls of the dbms_output package. You should also note that the first day of Christmas is a capital A as opposed to and a when it is the first day of Christmas.

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_2

Step: 3

blur-text-image_3

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

Databases Organizing Information Digital And Information Literacy

Authors: Greg Roza

1st Edition

1448805929, 978-1448805921

More Books

Students also viewed these Databases questions

Question

Define safety and health.

Answered: 1 week ago

Question

How can you defend against SQL injection attacks?

Answered: 1 week ago

Question

6. Describe to a manager the different types of distance learning.

Answered: 1 week ago

Question

1. Explain how new technologies are influencing training.

Answered: 1 week ago