Data update in view , need some help

Posted by Ray.chayan under Sql Server on 7/21/2010 | Views : 2162 | Status : [Member] | Replies : 4
Suppose I have created a view from more than 1 table. There is also a where claues in the select query of the view. Now I am updating all the data of a particular column of the View. Is it possible in this condition?

If updation is possible then is it reflect in the main table data?

what happen to those data are that are not in where clause in main table? Is this updation occur to those data?




Responses

Posted by: Vikvish on: 7/21/2010 [Member] Starter

Up
0
Down
you can view only those data in your created VIEW which is in your main table. Whatever you make changes in ur main table it will reflect in your created VIEW. if u update the records in your VIEW it will update in your main table too.

Those data which u wants to update but not in your main table will not do any updation.

with regards
vik.

vikram

Ray.chayan, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: PandianS on: 7/21/2010 [Member] [MVP] Silver

Up
0
Down
Hi

"If modification affects multiple base tables used in VIEW" then You can not do that.

Cheers

Cheers
www.SQLServerbuddy.blogspot.com
iLink Multitech Solutions

Ray.chayan, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Neeks on: 7/21/2010 [Member] Bronze

Up
0
Down
View is used to store the Definition not the data, If you are modifying the data in view from more than one table it is not possible.

Thanks,

Ray.chayan, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sriramnandha on: 6/26/2012 [Member] Starter | Points: 25

Up
0
Down
view is stored only defination.view it wont occupy any data.u cant update more than one table.

regards

sriram

Ray.chayan, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response