can we update a view which is created from two tables
Answers were Sorted based on User's Feedback
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
|Is This Answer Correct ?||47 Yes||10 No|
Answer / monika
yes,u can update by using instead of triggers.
|Is This Answer Correct ?||13 Yes||2 No|
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|
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|
Answer / usha
UPDATE PRODUCT SET UNITPRICE=UNITPRICE+(UNITPRICE*0.2)WHERE
|Is This Answer Correct ?||7 Yes||1 No|
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|
Answer / pavan
by using instead of trigger
|Is This Answer Correct ?||4 Yes||4 No|
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|
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%.
SET price = price * 1.10
WHERE pub_id = '0736'
|Is This Answer Correct ?||0 Yes||0 No|
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|
why sql is used as interpreter frequently rather than a compile?
what is the use of double ampersand (&&) in sql queries?
What are the usage of SAVEPOINTS?
How many rows will return from dual table?
What are tables and fields in the database?
What is offset and limit in sql?
What is the difference between mdf and ndf files?
Dear All, Question for this Week Find out possible error(s) (either at compile time or at runtime) in the following PL/SQL block. State the reason(s) and correct the errors. Declare Cursor C1 is select ename, sal, comm from emp; Begin For i in C1 Loop If i.comm between 299 and 999 then Dbms_output.put_line(i.Ename || ‘ ** Good Commission’); Elsif i.comm > 999 then Dbms_output.put_line(i.Empno || ‘ ** Very Good Commission’); close C1; Else Dbms_output.put_line(i.Ename || ‘ ** ’ ||nvl(i.comm,‘O’)); End if; End Loop; End;
Like shown below i have 3 columns(Name,No,Address). The values in name column i want to modity. Requirement : Keep only once space between two words (Fname,Lname) in the Name column. For this what is the query? Please answer me. Advance Thanks. Name No Address Reference manoj kumar kumar raja vinzay kumar rajendra prasad gowri nath -- -- --
What does plvtab enables you to do when you showthe contents of pl/sql tables?
What are the advantages of indexing?
SQL Tuning, Oracle Server 10g: Why is the following hint invalid? SELECT /*+ first_rows parallel(table_name,paral_number)*/