Hi everybody, i m qcdms21 , i would like to know can we update in views , i m been told select can be used but not insert. How about update? For ex: i have loanview1 as view , inside it i have loan , guarantor and student db tables. if i can't insert in the view , how else to go about? i tried inserting in loan , guarantor and student tables, later how to get the values updated in loanview1.

hey buddy,

you can update the views with a single update statement

update dbo.view1

set col1='washington'

where country='USA'

But if you insert some new records in the table, they will automatically appear in the view as a view does nothing but gets the data from the table.

but if you don't want to update the table and want to update only a specific columns :rolleyes: filtered then you go updating views.


thanks,
Chaitanya.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.