Answer Posted / suraj
-- Views are updatable regardless of the number of
tables involved in that view.
-- Data contained in the base tables are updated when
VIEWS are updated.
drop table t1
drop table t2
drop view t1t2
create table t1(ID int, FirstName varchar(20))
create table t2(ID int, LastName varchar(20))
insert t1 values(1,'John')
insert t1 values(2,'Mike')
insert t2 values(1,'Smith')
insert t2 values(2,'Shres')
create view t1t2
as
select t1.FirstName, t2.LastName
from t1 inner join t2 on t1.ID=t2.ID
update t1t2
set FirstName='Steve' where LastName='Smith'
select * from t1t2
select * from t1
Is This Answer Correct ? | 12 Yes | 6 No |
Post New Answer View All Answers
What is database isolation in sql server? : sql server database administration
What is read uncmmited?
Explain why variables called the most powerful component of ssis?
How to create new table with "create table" statements?
What is an indexed view?
What is raiseerror? What is raiseerror?
How to get nth highest salary from employee table.
explain declarative management framework (dmf) in sql server 2008?
Is null in sql server?
How to create a view on an existing table in ms sql server?
How does clustered and non clustered index work?
How to change the system date and time from SQL Plus Terminal ?
What is table-valued sub query?
Explain for xml explicit mode?
What is a user-defined function in the sql server and what is its advantage?