Wednesday, December 24, 2014

Can SQL Server views be updated






CanSQL Server views be updated (SQL Server interview questions andAnswers) ?



1 base table data it can update.With joins multiple table data if one enter 1 table data it will update.


Indexedviews in sql server Part 41



Note: I.e Materialized view in Oracle

Conditions to create an Index view:

Create View vsTotal
With SchemaBinding

as

Select …...From Table Name.

I.The “SchemaBinding” Option to be their, as Base Tables should not change.

Conditions:
1.If the is Null then ISNULL( columname),0 – set a default value , it should not be null
2.If Group By Clause is used, then a COUNT_BIG(*) need to be used not Count(*)
3.base tables in view, should dbo.tablename ( should be 2 things like dbo & tablename , not 3
,the server name) (no 3 partname)
4.First Index should be “Clustered Index” as no data is their initially so nonclustered index can not
be used.

Create Unique Clustered Index UIX_TotalSalesByProduct_Name On vwTotal(Name)

sqlserver 2008 linked server


No comments:

Post a Comment