{"id":53,"date":"2013-12-30T23:39:35","date_gmt":"2013-12-30T23:39:35","guid":{"rendered":"http:\/\/www.tinymoe.com\/bigbookomaths\/?p=53"},"modified":"2013-12-30T23:40:08","modified_gmt":"2013-12-30T23:40:08","slug":"sql-query-of-the-day-301220131638","status":"publish","type":"post","link":"http:\/\/www.tinymoe.com\/bigbookomaths\/?p=53","title":{"rendered":"SQL Query of the Day #301220131638"},"content":{"rendered":"<p><span style=\"text-decoration: underline;\">Query<\/span>:<\/p>\n<pre>SELECT t.name AS TableName,\r\nSCHEMA_NAME(schema_id) AS SchemaName,\r\nc.name AS ColumnName\r\nFROM sys.tables AS t\r\nINNER JOIN sys.columns c ON t.OBJECT_ID = c.OBJECT_ID\r\nWHERE c.name LIKE '%Hi-Keeba%'\r\nORDER BY SchemaName, TableName<\/pre>\n<p><span style=\"text-decoration: underline;\">Function<\/span>: Finds any value in any column in any table in a database.<\/p>\n<p><span style=\"text-decoration: underline;\">Source<\/span>: *sigh* &#8230;. I honestly don&#8217;t remember.<\/p>\n<p><span style=\"text-decoration: underline;\">Comments<\/span>: If you&#8217;re dealing with an enormous industrial-strength data jackhammer with hundreds of tables and millions of rows, this query can take a while to run. But you might have to use it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Query: SELECT t.name AS TableName, SCHEMA_NAME(schema_id) AS SchemaName, c.name AS ColumnName FROM sys.tables AS t INNER JOIN sys.columns c ON t.OBJECT_ID = c.OBJECT_ID WHERE c.name LIKE &#8216;%Hi-Keeba%&#8217; ORDER BY SchemaName, TableName Function: Finds any value in any column in any &hellip; <a href=\"http:\/\/www.tinymoe.com\/bigbookomaths\/?p=53\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-53","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"http:\/\/www.tinymoe.com\/bigbookomaths\/index.php?rest_route=\/wp\/v2\/posts\/53","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.tinymoe.com\/bigbookomaths\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.tinymoe.com\/bigbookomaths\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.tinymoe.com\/bigbookomaths\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.tinymoe.com\/bigbookomaths\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=53"}],"version-history":[{"count":2,"href":"http:\/\/www.tinymoe.com\/bigbookomaths\/index.php?rest_route=\/wp\/v2\/posts\/53\/revisions"}],"predecessor-version":[{"id":55,"href":"http:\/\/www.tinymoe.com\/bigbookomaths\/index.php?rest_route=\/wp\/v2\/posts\/53\/revisions\/55"}],"wp:attachment":[{"href":"http:\/\/www.tinymoe.com\/bigbookomaths\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=53"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.tinymoe.com\/bigbookomaths\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=53"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.tinymoe.com\/bigbookomaths\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=53"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}