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
In which tcp/ip port does sql server run? Can it be changed?
How many databases can we create in a single server?
What is compression - row-level and page-level compression?
Tell me what is normalization? Explain different forms of normalization?
Define synonym?
What are the advantages to use stored procedures?
Explain what are partitioned views and distributed partitioned views?
What are the benefits of normalization?
What are the properties of sub-query?
Can we perform backup restore operation on tempdb?
What is pessimistic concurrency?
How do I clean up sql server transaction log?
What are the system database in sql server 2005?
What is resultset concur_updatable?
Write a code to select distinct records without using the DISTINCT keyword.