can we update a view which is created from two tables

Answers were Sorted based on User's Feedback



can we update a view which is created from two tables..

Answer / haritha

we can not update a view which is created from two
tables.But we can update a view which is created from one
table.

Is This Answer Correct ?    47 Yes 10 No

can we update a view which is created from two tables..

Answer / monika

yes,u can update by using instead of triggers.

Is This Answer Correct ?    13 Yes 2 No

can we update a view which is created from two tables..

Answer / arup ratan banerjee

U can update non-updatable views to updatable ones by means
of Instead Of Triggers

Is This Answer Correct ?    9 Yes 1 No

can we update a view which is created from two tables..

Answer / brajesh

yes,but only of those column from which table primary key
is preserved in view

Is This Answer Correct ?    8 Yes 1 No

can we update a view which is created from two tables..

Answer / usha

UPDATE PRODUCT SET UNITPRICE=UNITPRICE+(UNITPRICE*0.2)WHERE
CATEGORIES.CATEGORYNAME=PRODUCT.CATEGORYID;

Is This Answer Correct ?    7 Yes 1 No

can we update a view which is created from two tables..

Answer / raj

folks, I check in practically that View (consist of more
then one table) can update and it impact at Base Table also.
(you can also check from your own self...)
but I data cannot delete from view.

Is This Answer Correct ?    2 Yes 1 No

can we update a view which is created from two tables..

Answer / pavan

by using instead of trigger

Is This Answer Correct ?    4 Yes 4 No

can we update a view which is created from two tables..

Answer / sankar

It is not possible to update a view which is created from
two tables.Actually when we update any viewtha first the
view has been updated followed by the base table.If we use
instead of trigger then the base be table will updated
first not the view.Because the view is stored in database
as a query.Once the base table will be changed,the view
query will hit the base table and reflects the changes.But
I think that's not the desired answer.

Is This Answer Correct ?    5 Yes 5 No

can we update a view which is created from two tables..

Answer / duong

Views in all versions of SQL Server are updatable (can be the target of UPDATE, DELETE, or INSERT statements), as long as the modification affects only one of the base tables referenced by the view, for example:

-- Increase the prices for publisher '0736' by 10%.
UPDATE titleview
SET price = price * 1.10
WHERE pub_id = '0736'
GO

Is This Answer Correct ?    0 Yes 0 No

can we update a view which is created from two tables..

Answer / chamin

You can't do it in data bound mode for SQL Server 2000.It
gives an error called
"Insufficient key column information for updating or refreshing"

Is This Answer Correct ?    2 Yes 6 No

Post New Answer

More SQL PLSQL Interview Questions

What is the primary use of normalization?

0 Answers  


How many types of privileges are available in sql?

0 Answers  


Can i use Commit inside the Trigger? Suppose i use commit what will be happy (it's complied /executed/work)

6 Answers  


how instead of triger is helpful for mutating tables errors handlling ?

2 Answers   Oracle,


What are the advantages of sql?

0 Answers  






What is cross join example?

0 Answers  


what are the different index configurations a table can have? : Sql dba

0 Answers  


I have a tablle like this: cust acc ----------- a 1 b 2 b 3 c 4 c 5 c 6 I Want below o/p: cust acc --------------- a 1 b 2|3 c 4|5|6 Please any one can you have any ideas share me. I have urgent requirement.

7 Answers   MTS,


Difference between truncate, delete and drop commands?

0 Answers  


Difference between IN and EXISTS

4 Answers   Nous, Polaris,


How can I get the number of records affected by a stored procedure?

0 Answers  


Should I use mbr or gpt?

0 Answers  


Categories