tag:blogger.com,1999:blog-495177919198719500.post9162648453770183085..comments2023-12-27T20:52:29.483-08:00Comments on Microsoft Sql Server Tutorials: 3 Different Ways to display VIEW definition using SQL Server 2008 Management StudioSuprotim Agarwalhttp://www.blogger.com/profile/08349831623922214390noreply@blogger.comBlogger9125tag:blogger.com,1999:blog-495177919198719500.post-79075441216734770512013-01-29T04:49:40.441-08:002013-01-29T04:49:40.441-08:00Here is how i do it:
SELECT OBJECT_DEFINITION (OB...Here is how i do it:<br /><br />SELECT OBJECT_DEFINITION (OBJECT_ID(N'VIEW_NAME'));mikehttps://www.blogger.com/profile/07305127470735564334noreply@blogger.comtag:blogger.com,1999:blog-495177919198719500.post-9713795095241213082012-12-18T11:22:26.892-08:002012-12-18T11:22:26.892-08:00Thank you, this helped a lot!Thank you, this helped a lot!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-495177919198719500.post-80378354922158154512011-03-23T12:18:24.754-07:002011-03-23T12:18:24.754-07:00A very handy post....!!A very handy post....!!Santanu.......https://www.blogger.com/profile/06235742041365590961noreply@blogger.comtag:blogger.com,1999:blog-495177919198719500.post-27036699983698008202011-03-23T12:10:42.048-07:002011-03-23T12:10:42.048-07:00This comment has been removed by the author.Santanu.......https://www.blogger.com/profile/06235742041365590961noreply@blogger.comtag:blogger.com,1999:blog-495177919198719500.post-69953996702205877242010-09-29T22:56:46.541-07:002010-09-29T22:56:46.541-07:00Very useful post. Keep up the good work guys... :)...Very useful post. Keep up the good work guys... :)Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-495177919198719500.post-43521855974191012782010-07-06T06:31:25.171-07:002010-07-06T06:31:25.171-07:00Thanks guys, very useful posts!!Thanks guys, very useful posts!!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-495177919198719500.post-57707725915299483622010-03-22T02:38:39.890-07:002010-03-22T02:38:39.890-07:00Thank you Madhivaan and Suprotim for sharing your ...Thank you Madhivaan and Suprotim for sharing your solutions. This is very useful as I used to manually check views from management studio. Knowledge does wonders!Jeffrey Wanknoreply@blogger.comtag:blogger.com,1999:blog-495177919198719500.post-62459866146000383952010-03-16T02:14:03.930-07:002010-03-16T02:14:03.930-07:00Thanks Madhivannan. As mentioned in my post, makin...Thanks Madhivannan. As mentioned in my post, making a JOIN (using objectid) between sys.views and sys.sql_modules will get the View Name and View DefinitionSuprotim Agarwalhttps://www.blogger.com/profile/08349831623922214390noreply@blogger.comtag:blogger.com,1999:blog-495177919198719500.post-60669177047551501632010-03-15T08:00:40.932-07:002010-03-15T08:00:40.932-07:00Note that information_schema.views will show you o...Note that information_schema.views will show you only 4000 characters<br /><br />Other reliable methods are<br /><br />1<br /><br />select object_definition(object_id) from sys.objects<br />where type='v'<br /><br />2<br /><br />select * from sys.[sql_modules]<br />where definition like 'CREATE VIEW%'<br /><br />Madhivanan<br />http://beyondrelational.com/blogs/madhivananMadhivananhttp://beyondrelational.com/blogs/madhivanannoreply@blogger.com