How To Use VIEW & Index in Sql Server 2005

Posted by Arun_Ch under Sql Server on 3/24/2012 | Points: 10 | Views : 1407 | Status : [Member] | Replies : 14
Hi,
I want Brief Explanation about sql index & Sql view with examples

Thanks & Regards
Arunkumar



Responses

Posted by: Patel28rajendra on: 3/24/2012 [Member] Starter | Points: 25

Up
0
Down
Hi

refer this link

http://msdn.microsoft.com/en-us/library/ms188783.aspx
http://odetocode.com/code/299.aspx

R D Patel

Arun_Ch, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Patel28rajendra on: 3/24/2012 [Member] Starter | Points: 25

Up
0
Down
Hi

for more on view visit this link

http://www.sql-server-performance.com/2004/views-in-sql-server/

http://msdn.microsoft.com/en-us/library/ms187956.aspx

R D Patel

Arun_Ch, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sksamantaray on: 3/24/2012 [Member] Silver | Points: 25

Up
0
Down

Hi,
For database index read these:
http://www.dotnetfunda.com/articles/article177.aspx
http://www.codeproject.com/Articles/59093/Defining-Indexes-with-SQL-Server-2005

Thanks,
Sanjay

Arun_Ch, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sksamantaray on: 3/24/2012 [Member] Silver | Points: 25

Up
0
Down
Database View is a virtual table which is created to hold complex queries.
To get data from multiple ,it is time consuming to create complex query every time we require.
So we can create a simple view using complex queries and reuse it many times.

Thanks,
Sanjay

Arun_Ch, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sksamantaray on: 3/24/2012 [Member] Silver | Points: 25

Up
0
Down
Here is an example of creating index on view.
http://strangenut.com/blogs/dacrowlah/archive/2008/11/26/creating-an-indexed-view-in-sql-server-2005-and-2008.aspx

Thanks,
Sanjay

Arun_Ch, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Patel28rajendra on: 3/26/2012 [Member] Starter | Points: 25

Up
0
Down
Hi

this is another link with example

http://www.w3schools.com/sql/sql_create_index.asp

http://msdn.microsoft.com/en-us/library/aa933148%28v=sql.80%29.aspx

R D Patel

Arun_Ch, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Patel28rajendra on: 3/26/2012 [Member] Starter | Points: 25

Up
0
Down
Hi

please Mark as answer if it Helps

Thanks

R D Patel

Arun_Ch, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 3/26/2012 [Member] Bronze | Points: 25

Up
0
Down

Patel28rajendra
this link might be useful

http://code.msdn.microsoft.com/CSASPNETExcelImportExport-71cf1101

Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

Arun_Ch, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Patel28rajendra on: 3/26/2012 [Member] Starter | Points: 25

Up
0
Down
Hi

Sabari Mahesh

I think you posted that link in wrong post

R D Patel

Arun_Ch, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 3/27/2012 [Member] Bronze | Points: 25

Up
0
Down
Patel28rajendra

ya


That is for You ...

Sorry i posted Wrongly

Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

Arun_Ch, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Patel28rajendra on: 3/27/2012 [Member] Starter | Points: 25

Up
0
Down
Hi

Sabari Mahesh
Its ok

R D Patel

Arun_Ch, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 3/27/2012 [Member] Bronze | Points: 25

Up
0
Down
Patel28rajendra
Actually
i Want to Ask Sorry With Arun_Ch

Hi Arun_Ch

Sorry For Posting Wrong Link

Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

Arun_Ch, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Muhsinathk on: 6/26/2012 [Member] Bronze | Points: 25

Up
0
Down
Index

Indexes are a common way to enhance database performance. An index allows the database server to find and retrieve specific rows much faster than it could do without an index. But indexes also add overhead to the database system as a whole, so they should be used sensibly.
2 types of Indexes
1.Clustered index
2.Nonclustured index

View

A View is a "Virtual Table". It is not like a simple table, but is a virtual table which contains columns and data from different tables (may be one or more tables). A View does not contain any data, it is a set of queries that are applied to one or more tables that is stored within the database as an object.

CREATE VIEW [View Name]
AS
[SELECT Statement]

Arun_Ch, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response