sql - Is a view in the database updatable? -


can update view in database? if so, how? if not, why not?

the actual answer "it depends", there no absolutes.

the basic criteria has updateable view in opinion of database engine, can engine uniquely identify row(s) updated , secondly fields updateable. if view has calculated field or represents product of parent/child join default answer no.

however possible cheat... in ms sql server , oracle (to take 2 examples) can have triggers fire when attempt insert or update view such can make server doesn't think updateable - because have knowledge server can't infer schema.


Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

linq to sql - Linq2EF: Return DateTime with a TimeZone Offset -

gdi+ - WxWidgets draw a bitmap with opacity -