exam questions

Exam 1z0-071 All Questions

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

Exam 1z0-071 topic 1 question 226 discussion

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

Examine these statements and results:



How many rows are retrieved by the last query?

  • A. 42
  • B. 0
  • C. 14
  • D. 28
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

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
ArslanAltaf
1 week, 3 days ago
If you haven't mentioned on commit preserve / Delete, the default behavior of system is to delete all the rows of GTT. So, once commit is complete, rows are deleted. Again, Insert command will copy all the rows from EMP which is 14 C is correct. Tested as well
upvoted 2 times
...
Mcromeo
6 months, 2 weeks ago
Selected Answer: C
C is correct
upvoted 2 times
...
jm9999
8 months, 3 weeks ago
Selected Answer: C
I think the default for GTT is 'on commit delete rows'. So after the commit there would be 0 rows but then after the next insert there would be 14.
upvoted 1 times
jm9999
8 months, 3 weeks ago
The interesting thing on this one: It appears as though 'create global temporary table table_name1 as select * from table_name2' creates an empty table even when table_name2 contains rows.
upvoted 1 times
lucemqy
7 months ago
When you create a table there's implicit COMMIT and GTT default is delete on commit so the table should be 0 rows
upvoted 1 times
...
...
...
WingL
11 months ago
Selected Answer: B
Tested. create table PRODUCTS (PROD_ID NUMBER, PROD_NAME VARCHAR2(50), PROD_CATEGORY VARCHAR2(50), PROD_MIN_PRICE NUMBER, PROD_UNIT_OF_MEASURE VARCHAR2(50)) INSERT into PRODUCTS VALUES(101,'Envoy','Hardware',6000,'Nos.') ; INSERT into PRODUCTS VALUES(102,'Y Box','Electronics',9000,'') ; INSERT into PRODUCTS VALUES(103,'DVD','Software/Other',2000,'Nos.') ; INSERT into PRODUCTS VALUES(104,'Documentation','Software/Other',4000,'') ; select * from PRODUCTS create global temporary table t_pro as select * from PRODUCTS insert into t_pro select * from PRODUCTS commit insert into t_pro select * from PRODUCTS select count(*) from t_pro
upvoted 2 times
lucemqy
7 months ago
You are seeing 0 probably because you are in APEX and APEX commit each line
upvoted 2 times
...
Mcromeo
6 months, 2 weeks ago
I tested your script select count(*) from t_pro give 0 row
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 ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago