exam questions

Exam 1z0-149 All Questions

View all questions & answers for the 1z0-149 exam

Exam 1z0-149 topic 1 question 5 discussion

Actual exam question from Oracle's 1z0-149
Question #: 5
Topic #: 1
[All 1z0-149 Questions]

Which two are true about INDEX-BY tables? (Choose two.)

  • A. The index can be integer or string.
  • B. The index can be integer only.
  • C. INDEX-BY table types can be created in PL/SQL blocks only.
  • D. INDEX-BY table types can be created both with the CREATE TYPE statement and in PL/SQL blocks.
  • E. INDEX-BY table types can be created with the CREATE TYPE statement.
Show Suggested Answer Hide Answer
Suggested Answer: AC 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Festo
Highly Voted 1 year, 6 months ago
A $ C ARE CORRECT
upvoted 5 times
...
Zenondanon
Most Recent 3 months ago
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
upvoted 1 times
...
TLA_CJ
3 months, 1 week ago
But why A as long as the index for an INDEX-BY table must be of type integer (BINARY_INTEGER or PLS_INTEGER)? B&C are correct in this case
upvoted 1 times
...
thranduyl
1 year, 1 month ago
Selected Answer: AC
A.C TESTED
upvoted 2 times
...
2oracleexam
1 year, 1 month ago
Selected Answer: AC
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.
upvoted 2 times
...
2oracleexam
1 year, 1 month ago
Selected Answer: AD
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;
upvoted 1 times
AlCoholic69
1 year, 1 month ago
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
upvoted 2 times
...
Aditya
10 months, 3 weeks ago
D is not correct, we can't create index by table in the database, only varray and nested table can create in database.
upvoted 2 times
...
...
Wahaj_2023
1 year, 6 months ago
A AND D , C IS NOT BEC (ONLYE)
upvoted 3 times
...
PurpleStudio
1 year, 10 months ago
A and C are TRUE!
upvoted 4 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
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.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago