{"id":658,"date":"2024-01-03T20:01:00","date_gmt":"2024-01-03T20:01:00","guid":{"rendered":"https:\/\/eipsoftware.com\/musings\/?p=658"},"modified":"2024-04-14T20:10:00","modified_gmt":"2024-04-14T20:10:00","slug":"code-for-view","status":"publish","type":"post","link":"https:\/\/eipsoftware.com\/musings\/code-for-view\/","title":{"rendered":"Code for View"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Show the DDL Code for a View<\/p>\n\n\n\n<!--more-->\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:tsql decode:true \">USE\t\tddreports;\n\nSELECT\t\tm.definition    \nFROM\t\tsys.views AS v\n\t\t\tINNER JOIN sys.sql_modules AS m \n\t\t\t\tON m.object_id = v.object_id\nWHERE\t\tv.name = 'mara'<\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Show the DDL Code for a View<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","footnotes":""},"categories":[43,4,6],"tags":[14,15],"series":[],"class_list":["post-658","post","type-post","status-publish","format-standard","hentry","category-sql-t-sql","category-code","category-sql","tag-sql","tag-t-sql"],"_links":{"self":[{"href":"https:\/\/eipsoftware.com\/musings\/wp-json\/wp\/v2\/posts\/658","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eipsoftware.com\/musings\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/eipsoftware.com\/musings\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/eipsoftware.com\/musings\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/eipsoftware.com\/musings\/wp-json\/wp\/v2\/comments?post=658"}],"version-history":[{"count":2,"href":"https:\/\/eipsoftware.com\/musings\/wp-json\/wp\/v2\/posts\/658\/revisions"}],"predecessor-version":[{"id":663,"href":"https:\/\/eipsoftware.com\/musings\/wp-json\/wp\/v2\/posts\/658\/revisions\/663"}],"wp:attachment":[{"href":"https:\/\/eipsoftware.com\/musings\/wp-json\/wp\/v2\/media?parent=658"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eipsoftware.com\/musings\/wp-json\/wp\/v2\/categories?post=658"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eipsoftware.com\/musings\/wp-json\/wp\/v2\/tags?post=658"},{"taxonomy":"series","embeddable":true,"href":"https:\/\/eipsoftware.com\/musings\/wp-json\/wp\/v2\/series?post=658"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}