{"id":1898,"date":"2024-05-01T14:40:24","date_gmt":"2024-05-01T20:40:24","guid":{"rendered":"https:\/\/pelnar.tech\/?p=1898"},"modified":"2024-05-01T14:40:24","modified_gmt":"2024-05-01T20:40:24","slug":"structure-of-sql-databases","status":"publish","type":"post","link":"https:\/\/pelnar.tech\/?p=1898","title":{"rendered":"Structure of SQL Databases"},"content":{"rendered":"\n<p>Recently I&#8217;ve had to get a sense for the structure of a database in order to communicate it to a vendor. One of those vendors gave me a query that helps determine the entire structure:<\/p>\n\n\n\n<p>SELECT<br>t.name AS TableName,<br>c.name AS ColumnName<br>FROM<br>sys.tables t<br>INNER JOIN<br>sys.columns c ON t.object_id = c.object_id<br>ORDER BY<br>t.name, c.name;<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>The output of this is the table name in Column A and the Field Name in Column B. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently I&#8217;ve had to get a sense for the structure of a database in order to communicate it to a vendor. One of those vendors gave me a query that&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_mi_skip_tracking":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1898","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"aioseo_notices":[],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"post-thumbnail":false,"newspaperly-grid":false,"newspaperly-slider":false,"newspaperly-small":false},"uagb_author_info":{"display_name":"admin","author_link":"https:\/\/pelnar.tech\/?author=1"},"uagb_comment_info":3,"uagb_excerpt":"Recently I&#8217;ve had to get a sense for the structure of a database in order to communicate it to a vendor. One of those vendors gave me a query that...","_links":{"self":[{"href":"https:\/\/pelnar.tech\/index.php?rest_route=\/wp\/v2\/posts\/1898","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pelnar.tech\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pelnar.tech\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pelnar.tech\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pelnar.tech\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1898"}],"version-history":[{"count":1,"href":"https:\/\/pelnar.tech\/index.php?rest_route=\/wp\/v2\/posts\/1898\/revisions"}],"predecessor-version":[{"id":1899,"href":"https:\/\/pelnar.tech\/index.php?rest_route=\/wp\/v2\/posts\/1898\/revisions\/1899"}],"wp:attachment":[{"href":"https:\/\/pelnar.tech\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1898"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pelnar.tech\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1898"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pelnar.tech\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1898"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}