exam questions

Exam 1z0-148 All Questions

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

Exam 1z0-148 topic 1 question 60 discussion

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

Examine the test_tbl table and its contents:

Examine this code:

What is the outcome of this anonymous PL/SQL block?

  • A. "It was updated" is displayed.
  • B. Successful completion without printing "It was updated".
  • C. A NO_DATA_FOUND exception is thrown.
  • D. ORA-06502: PL/SQL: numeric or value error: invalid LOB locator specified
  • E. ORA-22920: row containing the LOB value is not locked
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

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
orakell
Highly Voted 5 years, 6 months ago
I get B when I run this.
upvoted 5 times
szefco
4 years, 11 months ago
confirm. B is correct answer: CREATE TABLE test_tbl(id NUMBER, object BLOB); INSERT INTO test_tbl(id,object) values(1,'01'); INSERT INTO test_tbl(id,object) values(2,'11'); COMMIT; SELECT * FROM test_tbl; CREATE or replace TRIGGER trig_at AFTER UPDATE ON test_tbl BEGIN DBMS_OUTPUT.PUT_LINE('It was updated'); END; / SET SERVEROUTPUT ON; DECLARE dest_lob BLOB; src_lob BLOB; BEGIN SELECT object INTO dest_lob FROM test_tbl WHERE id=2 FOR UPDATE; SELECT object INTO src_lob FROM test_tbl WHERE id=1; dbms_lob.append(dest_lob,src_lob); END; / Table TEST_TBL created. 1 row inserted. 1 row inserted. Commit complete. ID OBJECT ---------- -------------------------------------------------------------------------------- 1 01 2 11 Trigger TRIG_AT compiled PL/SQL procedure successfully completed.
upvoted 1 times
szefco
4 years, 11 months ago
Also, per Oracle dosumentation:https://docs.oracle.com/cd/B19306_01/appdev.102/b14289/dcilobs.htm "Using OCI functions or the DBMS_LOB package to update LOB values or LOB attributes of object columns will not fire triggers defined on the table containing the columns or the attributes."
upvoted 4 times
...
...
...
chrishillinger
Most Recent 2 years, 9 months ago
Selected Answer: B
B is correct
upvoted 1 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 ...