Tipo de vista (metadata)

01/08/2007 - 23:59 por Junior | Informe spam
Como puedo sacar de las tablas del sistema el tipo de una vista para saber
si es indexada o normal?
 

Leer las respuestas

#1 Miguel Egea
02/08/2007 - 13:12 | Informe spam
a ver si con este ejemplo te sirve, está escrito para 2005 pero es muy
facilmente traducible a 2000, de hecho he usado las vistas más parecidas.

use tempdb
go
create table test(id int not null primary key , valor float, clasificacion
tinyint)
go
create view index_test with schemabinding as select clasificacion,
sum(isnull(valor,0)) sumadevalor ,count_big(*) cuantos from dbo.test group
by clasificacion
go
select * From sys.sysindexes where id=object_id('index_test')
go
create unique clustered index ix_index_test on index_test (clasificacion)
go
select * From sys.sysindexes where id=object_id('index_test')
go
drop view index_test
go
drop table test

Saludos
"Junior" <.> wrote in message news:
Como puedo sacar de las tablas del sistema el tipo de una vista para saber
si es indexada o normal?



Preguntas similares