Examine this SQL statement:
Which two are true? (Choose two.)
Examine this SQL statement:
Which two are true? (Choose two.)
The DELETE statement executes successfully even if the subquery selects multiple rows because the EXISTS condition only checks for the existence of at least one row in the subquery. The subquery in this SQL statement is a correlated subquery, meaning it references a column from the outer query (e.employee_id). As a result, the subquery must be executed once for each row in the EMPLOYEES table to determine whether the EXISTS condition is true for that row.
A. The DELETE statement executes successfully even if the subquery selects multiple rows. This is because the EXISTS condition only checks for the existence of at least one row in the subquery, regardless of how many rows are returned. E. The subquery is executed for every row in the EMPLOYEES table. This is because the subquery is a correlated subquery, which means that it references a column from the outer query (e.employee_id). As a result, the subquery must be executed once for each row in the EMPLOYEES table to determine whether the EXISTS condition is true or false for that row.
in other words the subquery is evaluated once for each row selected by the outer query
Why is B wrong?
The DELETE starts running and then it calls the subquery.
Understand that one thing is the execution of the DELETE command other is the deletion of the row.
AE is correct
A,D. Subquery isn't query before outer query.
AB are correct.