Question

Define a user-defined VARRAY data type named Phone_List_type as an array of size three of the...

Define a user-defined VARRAY data type named Phone_List_type as an array of size three of the type phone_type. using SQL ORACLE

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Dear Student ,

As per the requirement submitted above , kindly find the below solution.

This demonstration is using Oracle Live SQL.

Question :

Answer :

DECLARE
/*declaring Phone_List_type is of VARRAY type */
type Phone_List_type IS VARRAY(3) OF VARCHAR2(10);
phone_type Phone_List_type;
BEGIN
phone_type := Phone_List_type('8888888888', '9999888899', '9898989898');
FOR i in 1 .. 3 LOOP /*display phone numbers*/
dbms_output.put_line('Phone List: ' || phone_type(i));
END LOOP;
END;
/

Screen in Oracle Live SQL :

NOTE : PLEASE FEEL FREE TO PROVIDE FEEDBACK ABOUT THE SOLUTION.

Add a comment
Know the answer?
Add Answer to:
Define a user-defined VARRAY data type named Phone_List_type as an array of size three of the...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • You are asked to define a user-defined data type for students, that will contain the following...

    You are asked to define a user-defined data type for students, that will contain the following information about a student: ID number, first name, last name, major, GPA. Your structure should be cal Student. Based on the defined structure, user name on the command line, show how you will use a loop to search for the given name within the array of 5 students. use an array to record information about 5 students. Then, given a Write a C program...

  • 1. Write a C function named find that receives a one-dimensional array of type integer named...

    1. Write a C function named find that receives a one-dimensional array of type integer named arr and its size of type integer. The function fills the array with values that are the power of four (4^n) where n is the index. After that, the function must select a random index from the array and move the array elements around the element stored in the randomly selected index Example arr = [1, 4, 16, 64, 256) if the randomly selected...

  • define a structure named 'planet' containing three fields 'name', 'distance', and 'size'. decide on the appropriate...

    define a structure named 'planet' containing three fields 'name', 'distance', and 'size'. decide on the appropriate type of these variables

  • C Programming Language 2(a) Define a struct with 1 int array named i, 1 float array...

    C Programming Language 2(a) Define a struct with 1 int array named i, 1 float array named f, and one double array named d, each of size M. (b)Declare array x with N of those structs. (c)Write a void function to traverse array x (using a pointer) assigning to each element in each array d (in each struct in array x) the sum of the corresponding elements in arrays i and f (in the same struct). Use 3 pointers (of...

  • define a new type called "mylist" that points to a structure named "listnode" that consists of...

    define a new type called "mylist" that points to a structure named "listnode" that consists of two parts, an array of 5 integers named "data" and a pointer named "next" that points to the next "listnode" structure.

  • Create three variables for an int array, the size of the array, and a Scanner object...

    Create three variables for an int array, the size of the array, and a Scanner object to read keyboard input. Ask the user to specify the size of the array and then construct an int array of that size. Next, use a for loop to continuously ask the user to specify values for each location in the array. Lastly, print contents of the array as a histogram using the asterisk character (*). This will require using nested for loops. The...

  • Generate an array of random numbers in C++ 1)The size of the array is defined by...

    Generate an array of random numbers in C++ 1)The size of the array is defined by the user 2) The application is to take every odd number and find the mean. Program has to use structured programing and pointers

  • C programming 3. (40 pts) Define an array fof size 10, using call-by-reference (that is, use...

    C programming 3. (40 pts) Define an array fof size 10, using call-by-reference (that is, use of pointers), to pass the array to a function, named summation In main: define array, pass array, print out the array and the results on screen In function summation: take array from main and sum the array using the formula below: 10 fO 2 246 NOTE: you must use call-by-reference (the pointer) to call functions, as required; otherwise, no credits will be given.

  • Need helps on C++ attach. Thanks Pointers with classes a) A user-defined class named Timer has...

    Need helps on C++ attach. Thanks Pointers with classes a) A user-defined class named Timer has a constructor that takes two integer parameters to initialize hour and minute data members. Write a single C++ statement to create an object of the Timer class using dynamic memory allocation and assign it to a pointer variable named timePt r. It should call the constructor with two parameters. Use values of 10 and 20 for hour and minute respectively. b) Write the definition...

  • a) Declare and instantiate an array named scores of twenty-five elements of type int.   (b)Write a...

    a) Declare and instantiate an array named scores of twenty-five elements of type int.   (b)Write a statement that declares an array namedstreetAddress that contains exactly eighty elements of typechar. 2. In a single statement: declare, create and initialize an arraynamed a of ten elements of type int with the values of the elements (starting with the first) set to 10, 20,..., 100 respectively. 3. Declare an array reference variable, week, and initialize it to an array containing the strings "mon",...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT