Question: .Write the codes and execute an anonymous block that declares and populates an INDEX BY table ofcountries in South America (region_id = 5). The
.Write the codes and execute an anonymous block that declares and populates an INDEX BY table ofcountries in South America (region_id = 5). The table should use country_id as a primary key,and should store the country names as the element values. The data should be stored in thetable in ascending sequence of country_id. The block should not display any output. Save yourcode B. Modify the block so that after populating the INDEX BY table, it uses a FOR loop to display thecontents of the INDEX BY table. You will need to use the FIRST, LAST, and EXISTS tablemethods. Execute the block and check the displayed results. Save your code. C. Modify the block again so that instead of displaying all the contents of the table, it displays onlythe first and last elements and the number of elements in the INDEX BY table. Execute theblock and check the displayed results. EDL MyConnection COUNTRIES *. Welcome Page Columns Data | Model | Constraints | Grants | Statistics | Triggers | Flashback | Dependencies | Details | Partitions | Indexes | SQL Actions... COLUMN_NAME 1 COUNTRY_ID 2 COUNTRY_NAME 3 REGION_ID 4 POPULATION 5 DATE OF INDEPENDENCE 6 NATIONAL_HOLIDAY_DATE 7 AIRPORTS 8 COASTLINE 9 AREA 10 HIGH_ELEVATION 11 LOW ELEVATION 12 NATIONAL_HOLIDAY_NAME DATA_TYPE CHAR (2 BYTE) No VARCHAR2 (40 BYTE) Yes NUMBER Yes NUMBER Yes DATE Yes DATE Yes NUMBER Yes NUMBER Yes NUMBER Yes NUMBER Yes NUMBER Yes VARCHAR2 (100 BYTE) Yes NULLABLE DATA_DEFAULT (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) COLUMN_ID COMMENTS 1 Primary key of countr 2 Country name 3 Region ID for the cou 4 (null) 5 (null) 6 (null) 7 (null) 8 (null) 9 (null) 10 (null) 11 (null) 12 (null)
Step by Step Solution
There are 3 Steps involved in it
A Declare and populate an INDEX BY table of countries in South America DECLARE TYPE CountryIndexType ... View full answer
Get step-by-step solutions from verified subject matter experts
