What is the outcome?

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

Execute the following block of code:

What is the outcome?

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.

Explanation:



Leave a Reply 7

Your email address will not be published. Required fields are marked *


samkelo siyabonga ngubo

samkelo siyabonga ngubo

C

Yannick

Yannick

why will the sum be incorrect?

Wilna

Wilna

notice the where clause. it’ll give the sum of salaries for all department

Satish

Satish

Because in comparing department_id with department_id it will not consider any of department_id as the department_id=60. So it is like writing query without where clause. If u use any other name for department_id, it will give proper result.