B (false), depending EXPLAIN PLAN. no always is executed first.
C (false), ".o" is correlative
E (false) is possible multiple rows, an error more than row.
A and D is correct
AD; cannot be B, correlated subqueries are not executed before the parent (outer) query. Cannot be E, cannot set customer_name to multiple values for each row
BD,
A is incorrect only matching rows are updated, not all
C is invalid, statement correct structure
E is incorrect, in case multiple rows, error multiple rows in subquery
Actually i though in that way. But most likely customer table is PK. Orders table is FK. So it means the data that in the orders table also have in the customers table. And all rows will be updated.
most likely customer table is PK. Orders table is FK. So it means the data that in the orders table also have in the customers table. And all rows will be updated.
I think B is correct, subquery will execute for each row its right but also update will update for each raw after fulfilling the condition of subquery :)
Then how update will update each raw ? update will check its resources "subquery" is condition met ? yes ? then update after execute subquery and fully checking it.
The STATMENT update will execute first, then the action of updating will execute after the subquery. explain plan for
update ordersQ8 o
set customer_name =
(select cust_last_name
from customersQ8
where customer_id = o.customer_id);
SELECT plan_table_output
FROM TABLE(DBMS_XPLAN.DISPLAY('plan_table',null,'basic +note'));
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.
meddheddy
Highly Voted 2 years, 6 months agohighwater
Most Recent 5 days, 20 hours agoThameur01
2 months, 1 week agoDrexan
5 months, 1 week agoRamileu
9 months agoFredderik91
10 months, 3 weeks agohmatinnn
1 year, 2 months agoLee_jong_suk
1 year, 3 months agojm9999
1 year, 6 months agoHassanMkhlalati
1 year, 6 months agoFredderik91
1 year, 10 months agoHassanMkhlalati
1 year, 6 months agoGENO123
1 year, 9 months agoTofOra
1 year, 1 month agohmatinnn
1 year, 3 months agoNB196
1 year, 10 months agoraduM
1 year, 9 months agohmatinnn
1 year, 3 months agoCyberP
1 year, 10 months agoTofOra
1 year, 1 month agoRik92
1 year, 10 months agokuff
1 year, 10 months agokaplanek
1 year, 11 months agoalic_alex
2 years ago