Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 get system view schema

Author  Topic 

Jude_Aj
Starting Member

22 Posts

Posted - 2009-06-10 : 02:59:55
Hi,
Is there any way i can view the schema of the system views in SQL server 2005.

Thanks

Nageswar9
Aged Yak Warrior

600 Posts

Posted - 2009-06-10 : 03:01:29
is this u want?

select * from sys.objects where type = 'v'
Go to Top of Page

bklr
Master Smack Fu Yak Hacker

1693 Posts

Posted - 2009-06-10 : 03:04:47
select * from information_Schema.views

select * from sys.views
Go to Top of Page

Jude_Aj
Starting Member

22 Posts

Posted - 2009-06-10 : 03:06:00
No, i was looking for the "query" of the system views, as in "create view sys,sysindexes...."
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2009-06-10 : 03:59:01
sp_helptext 'viewname here'


E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2009-06-10 : 04:20:04
Make use of the result

select 'EXEC sp_helptext '''+name+'''' from sys.views

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

Jude_Aj
Starting Member

22 Posts

Posted - 2009-06-10 : 08:48:21
Thanks that solved the problem!!
Go to Top of Page
   

- Advertisement -