Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

create key or index on view

Status
Not open for further replies.

lucyc

Programmer
Mar 1, 2002
62
US
Is it possible to create a key or index on view??? If it is then how and what is the syntax. Thanks.
 
hi

here's the syntax

CREATE [ UNIQUE ] [ CLUSTERED | NONCLUSTERED ] INDEX index_name
ON { table | view } ( column [ ASC | DESC ] [ ,...n ] )
[ WITH < index_option > [ ,...n] ]
[ ON filegroup ]

< index_option > :: =
{ PAD_INDEX |
FILLFACTOR = fillfactor |
IGNORE_DUP_KEY |
DROP_EXISTING |
STATISTICS_NORECOMPUTE |
SORT_IN_TEMPDB
}

cheers

pgtek
 
hi pgtek,

Can you send me an example? Is it work on sql 7.0?
 
Hi Jay,

The schemblinding does't work on SQL7.0
 
SQL 7 does not support indexed views at all. You need SQL 2000 to do this.

--James
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top