A is missleading , literaly it can be indexed by PLS Integer and string , remember than now IZ0-149 is validated against 19 version of database.
Table 5-1 PL/SQL Collection Types , so the Associative array/indexed by table caan be deffined in In PL/SQL block or package
In PL/SQL block or package
My bad, didn't check.
D is not true.
Checked in Oracle DB 12.1.0.2.0
Compilation errors for TYPE APPS.PHONEBOOK
Error: PLS-00355: use of pl/sql table not allowed in this context
Line: 1
Text: CREATE OR REPLACE TYPE PhoneBook AS TABLE OF VARCHAR2(100) INDEX BY BINARY_INTEGER
Error: PL/SQL: Compilation unit analysis terminated
Line: 1
Text: CREATE OR REPLACE TYPE PhoneBook AS TABLE OF VARCHAR2(100) INDEX BY BINARY_INTEGER
A and C is true.
A and D.
You can create type INDEX BY, example from ChatGPT:
CREATE TYPE PhoneBook AS TABLE OF VARCHAR2(100) INDEX BY BINARY_INTEGER;
After creating this type, you can use it to declare variables or columns in tables. For instance, you might use it within PL/SQL code like this:
DECLARE
-- Declare a variable of type PhoneBook
myContacts PhoneBook;
BEGIN
-- Assign values to the INDEX-BY table
myContacts(1) := 'John Doe';
myContacts(2) := 'Jane Smith';
-- Accessing elements
DBMS_OUTPUT.PUT_LINE('First contact: ' || myContacts(1));
DBMS_OUTPUT.PUT_LINE('Second contact: ' || myContacts(2));
END;
Livesql
CREATE TYPE PhoneBook AS TABLE OF VARCHAR2(100) INDEX BY BINARY_INTEGER;
Errors: TYPE PHONEBOOK
Line/Col: 0/0 PL/SQL: Compilation unit analysis terminated
Line/Col: 1/19 PLS-00355: use of pl/sql table not allowed in this context
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Festo
Highly Voted 1 year, 6 months agoZenondanon
Most Recent 3 months agoTLA_CJ
3 months, 1 week agothranduyl
1 year, 1 month ago2oracleexam
1 year, 1 month ago2oracleexam
1 year, 1 month agoAlCoholic69
1 year, 1 month agoAditya
10 months, 3 weeks agoWahaj_2023
1 year, 6 months agoPurpleStudio
1 year, 10 months ago