Cyber Monday 2024! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Oracle Exam 1Z0-071 Topic 13 Question 94 Discussion

Actual exam question for Oracle's 1Z0-071 exam
Question #: 94
Topic #: 13
[All 1Z0-071 Questions]

Examine these statements and results

SQL> SELECT COUNT(*) FROM emp

COUNT(*)

---------------------

14

sQL> CREATE GLOBAL TEMPORARY TABLE t emp As SELECT * FROM emp;

Table created

SQL> INSERT INTo temp SELECT * FROM emp;

14 rows created

SQL> COMMIT:

Commit complete*

SQL> INSERT INTo temp SELECT * EROM emp;

14. rows created

SQL> SELECT COUNT(*) FROM t emp

How many rows are retrieved by the last query?

Show Suggested Answer Hide Answer
Suggested Answer: C

Contribute your Thoughts:

Gearldine
6 months ago
Wait, wait, wait. What if the second INSERT INTO t_emp SELECT * FROM emp; statement is actually inserting the same rows twice? That would make the answer 42, right?
upvoted 0 times
Chauncey
5 months ago
But wouldn't the temporary table only store unique rows? So the answer should still be 28.
upvoted 0 times
...
Chauncey
5 months ago
That's a good point. If the second INSERT INTO statement is inserting the same rows twice, then the answer would be 42.
upvoted 0 times
...
...
Joanna
6 months ago
Haha, classic database question! I bet the answer is 14, because the temporary table is, well, temporary. It's not like the rows are stored permanently, you know?
upvoted 0 times
Gilma
5 months ago
Exactly, so even though we inserted the data twice, the count will still be 14.
upvoted 0 times
...
Tatum
5 months ago
Yeah, that's right. The temporary table is just for that session, so it won't affect the original table.
upvoted 0 times
...
Ruthann
5 months ago
I think the answer is 14 too, because the temporary table only holds the data temporarily.
upvoted 0 times
...
...
Brynn
6 months ago
Hmm, I'm not so sure. Temporary tables are, well, temporary. So maybe the rows get cleared after the first commit? Let me think about this one...
upvoted 0 times
Elza
5 months ago
Oh, I see. So the answer is B) 0.
upvoted 0 times
...
Elouise
5 months ago
Yes, that's correct. So the last query should retrieve 0 rows.
upvoted 0 times
...
Phuong
6 months ago
Temporary tables are cleared after a commit, right?
upvoted 0 times
...
...
Freida
6 months ago
The last query should retrieve 28 rows, since we inserted the contents of the emp table twice into the temporary table t_emp.
upvoted 0 times
Precious
6 months ago
Commit complete
upvoted 0 times
...
Elin
6 months ago
Yes, because we inserted the contents of emp table twice into the temporary table t_emp.
upvoted 0 times
...
Rex
6 months ago
It should be 28 rows.
upvoted 0 times
...
Leigha
6 months ago
A) 28
upvoted 0 times
...
Reta
6 months ago
The last query should retrieve 28 rows, since we inserted the contents of the emp table twice into the temporary table t_emp.
upvoted 0 times
...
Lashon
6 months ago
Correct, the answer is A) 28.
upvoted 0 times
...
Lindsey
6 months ago
The last query should retrieve 28 rows, since we inserted the contents of the emp table twice into the temporary table t_emp.
upvoted 0 times
...
...
Leigha
6 months ago
I agree with Tandra, because the temporary table 't emp' was created with the same data as 'emp', so it should have 14 rows.
upvoted 0 times
...
Tandra
6 months ago
I think the answer is C) 14.
upvoted 0 times
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77