exam questions

Exam 1z0-144 All Questions

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

Exam 1z0-144 topic 1 question 40 discussion

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

View the Exhibit and examine the structure of the employees table.


Execute the following block of code:

What is the outcome?

  • A. It gives an error because group functions cannot be used in anonymous blocks.
  • B. It executes successfully and correctly gives the result of the sum of salaries in department 60.
  • C. It executes successfully and incorrectly gives the result of the sum of salaries in department 60.
  • D. It gives an error because the variable name and column name are the same in the where clause of the select statement.
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
Naveen_2022
2 years, 10 months ago
Its like Where 1=1, Due to Column name and Variable name being same, In this case SQL considers column.
upvoted 1 times
Naveen_2022
2 years, 10 months ago
Yes, Answer is C
upvoted 1 times
...
...
cf21
3 years, 6 months ago
Selected Answer: C
Answer is C, because the where clause will always return true, since it will only compare the column on the table to itself instead of to the parameter with the same name. Therefore instead of the where cause limiting anything, it will calculate all the rows.
upvoted 2 times
...
Limak665
4 years ago
This will return sum of all, rather than just department 60.
upvoted 2 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 ...