Interviews5 answers
SQL View is formed by joins of two table. if we modify view by some query , can corresponding records from both table are getting updated ?
5 Answers
No it will not update in both the table.Only one table will be update
Create View asp_vw
AS
(Select h.First_name,h.salary,A.first_name as Test,A.date_of_birth from honey h left join
ashu A on h.first_name=A.first_name)
Select * from asp_vw
Update asp_vw set first_name = 'parkash1'
ankit murelaPosted Feb 17, 2018, 6:52 PM EST
No it will not update both the tables. it will update only one table.
vijay reddyPosted Nov 9, 2016, 3:52 AM EST
No it will not update both the tables. it will update only one table.
vijay reddyPosted Nov 9, 2016, 3:52 AM EST
Yes It will be Updated .
If you did not have WITH CHECK OPTION defined in View, the UPDATE statement would succeed,
Ashutosh TripathiPosted Mar 10, 2016, 1:31 AM EST
1) Yes
2) No
Why ??
Rupali ShindePosted Nov 26, 2015, 7:01 PM EST

