{"id":851,"date":"2015-04-24T12:29:28","date_gmt":"2015-04-24T10:29:28","guid":{"rendered":"https:\/\/www.boettrich.info\/blog\/?p=851"},"modified":"2015-04-24T12:29:28","modified_gmt":"2015-04-24T10:29:28","slug":"sql-server-query-to-find-a-column-in-every-table-in-all-tables","status":"publish","type":"post","link":"https:\/\/www.boettrich.info\/blog\/beitrag\/sql-server-query-to-find-a-column-in-every-table-in-all-tables\/","title":{"rendered":"SQL Server &#8211; Query to find a column in every table in all tables"},"content":{"rendered":"<p>Source:\u00a0http:\/\/blog.sqlauthority.com\/2008\/08\/06\/sql-server-query-to-find-column-from-all-tables-of-database\/<\/p>\n<p>&nbsp;<\/p>\n<p><em>USE AdventureWorks<\/em><br \/>\n<em>GO<\/em><br \/>\n<em>SELECT t.name AS table_name,<\/em><br \/>\n<em>SCHEMA_NAME(schema_id) AS schema_name,<\/em><br \/>\n<em>c.name AS column_name<\/em><br \/>\n<em>FROM sys.tables AS t<\/em><br \/>\n<em>INNER\u00a0JOIN sys.columns\u00a0c ON t.OBJECT_ID = c.OBJECT_ID<\/em><br \/>\n<em>WHERE c.name LIKE &#8218;%EmployeeID%&#8216;<\/em><br \/>\n<em>ORDER\u00a0BY schema_name, table_name;<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Source:\u00a0http:\/\/blog.sqlauthority.com\/2008\/08\/06\/sql-server-query-to-find-column-from-all-tables-of-database\/ &nbsp; USE AdventureWorks GO SELECT t.name AS table_name, SCHEMA_NAME(schema_id) AS schema_name, c.name AS column_name FROM sys.tables AS t INNER\u00a0JOIN sys.columns\u00a0c ON t.OBJECT_ID = c.OBJECT_ID WHERE c.name LIKE &#8218;%EmployeeID%&#8216; ORDER\u00a0BY schema_name, table_name;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","footnotes":""},"categories":[1,37,6],"tags":[],"class_list":["post-851","post","type-post","status-publish","format-standard","hentry","category-beitrag","category-sql-it","category-technik"],"_links":{"self":[{"href":"https:\/\/www.boettrich.info\/blog\/wp-json\/wp\/v2\/posts\/851","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.boettrich.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.boettrich.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.boettrich.info\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.boettrich.info\/blog\/wp-json\/wp\/v2\/comments?post=851"}],"version-history":[{"count":1,"href":"https:\/\/www.boettrich.info\/blog\/wp-json\/wp\/v2\/posts\/851\/revisions"}],"predecessor-version":[{"id":852,"href":"https:\/\/www.boettrich.info\/blog\/wp-json\/wp\/v2\/posts\/851\/revisions\/852"}],"wp:attachment":[{"href":"https:\/\/www.boettrich.info\/blog\/wp-json\/wp\/v2\/media?parent=851"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.boettrich.info\/blog\/wp-json\/wp\/v2\/categories?post=851"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.boettrich.info\/blog\/wp-json\/wp\/v2\/tags?post=851"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}