{"id":1784,"date":"2020-08-20T21:39:22","date_gmt":"2020-08-20T12:39:22","guid":{"rendered":"http:\/\/blog.anyons.net\/?p=1784"},"modified":"2022-07-12T14:43:06","modified_gmt":"2022-07-12T05:43:06","slug":"mssql-table-list-query","status":"publish","type":"post","link":"https:\/\/anyons.net\/?p=1784","title":{"rendered":"MSSQL Table List Query"},"content":{"rendered":"\n\n\n<pre class=\"wp-block-code\"><code>(10%) select name from sysobjects where type='U'\n(13%) select * from information_schema.tables\n(76%) select * from sys.tables<\/code><\/pre>\n\n\n","protected":false},"excerpt":{"rendered":"<p> (10%) select name from sysobjects where type=&#8217;U&#8217; (13%) select * from information_schema.tables (76%) select * from sys.tables <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[93,96],"tags":[406,112,117,104,407,405,404],"class_list":["post-1784","post","type-post","status-publish","format-standard","hentry","category-command","category-programming","tag-information_schema","tag-mssql","tag-query","tag-select","tag-sysobjects","tag-system-tables","tag-table-list","odd"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>MSSQL Table List Query - anydragon<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/anyons.net\/?p=1784\" \/>\n<meta property=\"og:locale\" content=\"ko_KR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"MSSQL Table List Query - anydragon\" \/>\n<meta property=\"og:description\" content=\"(10%) select name from sysobjects where type=&#039;U&#039; (13%) select * from information_schema.tables (76%) select * from sys.tables\" \/>\n<meta property=\"og:url\" content=\"https:\/\/anyons.net\/?p=1784\" \/>\n<meta property=\"og:site_name\" content=\"anydragon\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/anydragon\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/anydragon\" \/>\n<meta property=\"article:published_time\" content=\"2020-08-20T12:39:22+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-07-12T05:43:06+00:00\" \/>\n<meta name=\"author\" content=\"anydragon\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@anydragon\" \/>\n<meta name=\"twitter:site\" content=\"@anydragon\" \/>\n<meta name=\"twitter:label1\" content=\"\uae00\uc4f4\uc774\" \/>\n\t<meta name=\"twitter:data1\" content=\"anydragon\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/anyons.net\\\/?p=1784#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/anyons.net\\\/?p=1784\"},\"author\":{\"name\":\"anydragon\",\"@id\":\"https:\\\/\\\/anyons.net\\\/#\\\/schema\\\/person\\\/e848d5666536ff82e9ee531c70249f2b\"},\"headline\":\"MSSQL Table List Query\",\"datePublished\":\"2020-08-20T12:39:22+00:00\",\"dateModified\":\"2022-07-12T05:43:06+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/anyons.net\\\/?p=1784\"},\"wordCount\":4,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/anyons.net\\\/#\\\/schema\\\/person\\\/e848d5666536ff82e9ee531c70249f2b\"},\"keywords\":[\"information_schema\",\"MSSQL\",\"query\",\"select\",\"sysobjects\",\"system.tables\",\"table list\"],\"articleSection\":[\"Command\",\"Programming\"],\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/anyons.net\\\/?p=1784#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/anyons.net\\\/?p=1784\",\"url\":\"https:\\\/\\\/anyons.net\\\/?p=1784\",\"name\":\"MSSQL Table List Query - anydragon\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/anyons.net\\\/#website\"},\"datePublished\":\"2020-08-20T12:39:22+00:00\",\"dateModified\":\"2022-07-12T05:43:06+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/anyons.net\\\/?p=1784#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/anyons.net\\\/?p=1784\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/anyons.net\\\/?p=1784#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/anyons.net\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"MSSQL Table List Query\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/anyons.net\\\/#website\",\"url\":\"https:\\\/\\\/anyons.net\\\/\",\"name\":\"anydragon\",\"description\":\"mac, linux, aws, c, c++, mysql, mssql, redis, csharp, nodejs, rust, golang\",\"publisher\":{\"@id\":\"https:\\\/\\\/anyons.net\\\/#\\\/schema\\\/person\\\/e848d5666536ff82e9ee531c70249f2b\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/anyons.net\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ko-KR\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/anyons.net\\\/#\\\/schema\\\/person\\\/e848d5666536ff82e9ee531c70249f2b\",\"name\":\"anydragon\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"http:\\\/\\\/anyons.net\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/bg3-scaled.jpeg\",\"url\":\"http:\\\/\\\/anyons.net\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/bg3-scaled.jpeg\",\"contentUrl\":\"http:\\\/\\\/anyons.net\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/bg3-scaled.jpeg\",\"width\":2560,\"height\":1440,\"caption\":\"anydragon\"},\"logo\":{\"@id\":\"http:\\\/\\\/anyons.net\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/bg3-scaled.jpeg\"},\"sameAs\":[\"http:\\\/\\\/anyons.net\",\"https:\\\/\\\/www.facebook.com\\\/anydragon\",\"https:\\\/\\\/x.com\\\/anydragon\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCr78KWpvmk398vPfpUTWNLg\"],\"url\":\"https:\\\/\\\/anyons.net\\\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"MSSQL Table List Query - anydragon","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/anyons.net\/?p=1784","og_locale":"ko_KR","og_type":"article","og_title":"MSSQL Table List Query - anydragon","og_description":"(10%) select name from sysobjects where type='U' (13%) select * from information_schema.tables (76%) select * from sys.tables","og_url":"https:\/\/anyons.net\/?p=1784","og_site_name":"anydragon","article_publisher":"https:\/\/www.facebook.com\/anydragon","article_author":"https:\/\/www.facebook.com\/anydragon","article_published_time":"2020-08-20T12:39:22+00:00","article_modified_time":"2022-07-12T05:43:06+00:00","author":"anydragon","twitter_card":"summary_large_image","twitter_creator":"@anydragon","twitter_site":"@anydragon","twitter_misc":{"\uae00\uc4f4\uc774":"anydragon"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/anyons.net\/?p=1784#article","isPartOf":{"@id":"https:\/\/anyons.net\/?p=1784"},"author":{"name":"anydragon","@id":"https:\/\/anyons.net\/#\/schema\/person\/e848d5666536ff82e9ee531c70249f2b"},"headline":"MSSQL Table List Query","datePublished":"2020-08-20T12:39:22+00:00","dateModified":"2022-07-12T05:43:06+00:00","mainEntityOfPage":{"@id":"https:\/\/anyons.net\/?p=1784"},"wordCount":4,"commentCount":0,"publisher":{"@id":"https:\/\/anyons.net\/#\/schema\/person\/e848d5666536ff82e9ee531c70249f2b"},"keywords":["information_schema","MSSQL","query","select","sysobjects","system.tables","table list"],"articleSection":["Command","Programming"],"inLanguage":"ko-KR","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/anyons.net\/?p=1784#respond"]}]},{"@type":"WebPage","@id":"https:\/\/anyons.net\/?p=1784","url":"https:\/\/anyons.net\/?p=1784","name":"MSSQL Table List Query - anydragon","isPartOf":{"@id":"https:\/\/anyons.net\/#website"},"datePublished":"2020-08-20T12:39:22+00:00","dateModified":"2022-07-12T05:43:06+00:00","breadcrumb":{"@id":"https:\/\/anyons.net\/?p=1784#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/anyons.net\/?p=1784"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/anyons.net\/?p=1784#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/anyons.net\/"},{"@type":"ListItem","position":2,"name":"MSSQL Table List Query"}]},{"@type":"WebSite","@id":"https:\/\/anyons.net\/#website","url":"https:\/\/anyons.net\/","name":"anydragon","description":"mac, linux, aws, c, c++, mysql, mssql, redis, csharp, nodejs, rust, golang","publisher":{"@id":"https:\/\/anyons.net\/#\/schema\/person\/e848d5666536ff82e9ee531c70249f2b"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/anyons.net\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ko-KR"},{"@type":["Person","Organization"],"@id":"https:\/\/anyons.net\/#\/schema\/person\/e848d5666536ff82e9ee531c70249f2b","name":"anydragon","image":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"http:\/\/anyons.net\/wp-content\/uploads\/2022\/06\/bg3-scaled.jpeg","url":"http:\/\/anyons.net\/wp-content\/uploads\/2022\/06\/bg3-scaled.jpeg","contentUrl":"http:\/\/anyons.net\/wp-content\/uploads\/2022\/06\/bg3-scaled.jpeg","width":2560,"height":1440,"caption":"anydragon"},"logo":{"@id":"http:\/\/anyons.net\/wp-content\/uploads\/2022\/06\/bg3-scaled.jpeg"},"sameAs":["http:\/\/anyons.net","https:\/\/www.facebook.com\/anydragon","https:\/\/x.com\/anydragon","https:\/\/www.youtube.com\/channel\/UCr78KWpvmk398vPfpUTWNLg"],"url":"https:\/\/anyons.net\/?author=1"}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":630,"url":"https:\/\/anyons.net\/?p=630","url_meta":{"origin":1784,"position":0},"title":"table \uc874\uc7ac \uc548\ud560\ub54c table \uc0dd\uc131","author":"anydragon","date":"2014\ub144 02\uc6d4 14\uc77c","format":false,"excerpt":"drop table tempdb; if exists ( select * from sysobjects where name = 'tempdb' and xtype = 'U' ) create table cars111 ( Name0 varchar(64) not null, Name1 varchar(64) not null, Name2 varchar(64) not null ); select * from INFORMATION_SCHEMA.COLUMNS where table_name = 'cars111' and column_name = 'Name0';","rel":"","context":"&quot;Programming&quot;\uc5d0\uc11c","block_context":{"text":"Programming","link":"https:\/\/anyons.net\/?cat=96"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1931,"url":"https:\/\/anyons.net\/?p=1931","url_meta":{"origin":1784,"position":1},"title":"MSSQL History","author":"anydragon","date":"2021\ub144 03\uc6d4 19\uc77c","format":false,"excerpt":"SELECT db_name(st.dbid) DBName , object_schema_name(objectid, st.dbid) SchemaName , object_name(objectid, st.dbid) SPName , qs.total_elapsed_time , creation_time , last_execution_time , text FROM sys.dm_exec_query_stats qs CROSS APPLY sys.dm_exec_sql_text(qs.plan_handle)st JOIN sys.dm_exec_cached_plans cp ON qs.plan_handle = cp.plan_handle \u00a0","rel":"","context":"&quot;Programming&quot;\uc5d0\uc11c","block_context":{"text":"Programming","link":"https:\/\/anyons.net\/?cat=96"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":270,"url":"https:\/\/anyons.net\/?p=270","url_meta":{"origin":1784,"position":2},"title":"SQL Injection \ubc29\uc5b4","author":"anydragon","date":"2012\ub144 02\uc6d4 20\uc77c","format":false,"excerpt":"\ucd9c\ucc98 : http:\/\/forums.asp.net\/t\/1254125.aspx \ub97c \ubcf4\uba74 ASP.NET 1.1\uc774\ub0d0 2.0 \uc774\ub0d0\uc5d0 \ub530\ub77c \uac01\uac01 \uc774\ub807\uac8c \ud558\ub77c\uace0 \ud55c\ub2e4. \uc544\uc9c1\uc740 \ub09c web.config\uac00 \uc775\uc219\uce58 \uc54a\uc544\uc11c \uadf8\ub7f0\uc9c0 1.1 \ubc29\uc2dd\uc73c\ub85c \ud558\uba74 \uc798 \ub418\ub294\ub370 2.0 \ubc29\uc2dd\uc73c\ub85c\ub294 \uc798 \uc548\ub41c\ub2e4. -_- ASP.NET 1.1 C# global.asax using System.Globalization; \/\/Defines the set of characters that will be checked. \/\/You can add to this\u2026","rel":"","context":"&quot;Programming&quot;\uc5d0\uc11c","block_context":{"text":"Programming","link":"https:\/\/anyons.net\/?cat=96"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":729,"url":"https:\/\/anyons.net\/?p=729","url_meta":{"origin":1784,"position":3},"title":"MSSQL \ud55c\uae00 \uc601\ubb38 \uad6c\ubd84","author":"anydragon","date":"2015\ub144 03\uc6d4 11\uc77c","format":false,"excerpt":"[\ud55c\uae00\uceec\ub7fc\uac12 \ub4e4\uc5b4\uc788\ub294 \uac83\ub9cc \uc9c0\uc6b0\uae30] select *\u00a0 from tbl where field like '%[\uac00-\ud7a3]%' delete\u00a0 from tbl where field like '%[\uac00-\ud7a3]%' [\uc601\ubb38\uceec\ub7fc\uac12 \ub4e4\uc5b4\uc788\ub294 \uac83\ub9cc \uc9c0\uc6b0\uae30] select * from tbl where field like '%[A-Za-z]%' delete from tbl where field like '%[A-Za-z]%'","rel":"","context":"&quot;Programming&quot;\uc5d0\uc11c","block_context":{"text":"Programming","link":"https:\/\/anyons.net\/?cat=96"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1928,"url":"https:\/\/anyons.net\/?p=1928","url_meta":{"origin":1784,"position":4},"title":"\ud1b5\uacc4\uc6a9 \ucffc\ub9ac \uc0d8\ud50c","author":"anydragon","date":"2021\ub144 03\uc6d4 18\uc77c","format":false,"excerpt":"select year as '\ub144', month as '\uc6d4', count(*) as count from ( select YEAR(us.fd_dtcreate) as 'year', MONTH(us.fd_dtcreate) as 'month' from tb_ykfile as us where us.fd_dtCreate > '2020-08-01' and us.fd_dtCreate <= '2022-01-01' ) tb group by year, month order by year, month ; SELECT CONVERT(varCHAR(10),Dateadd(d, a.number,'2020-08-01 00:00:00'),120) AS dt ,Isnull(b.count, 0)\u2026","rel":"","context":"&quot;Programming&quot;\uc5d0\uc11c","block_context":{"text":"Programming","link":"https:\/\/anyons.net\/?cat=96"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1886,"url":"https:\/\/anyons.net\/?p=1886","url_meta":{"origin":1784,"position":5},"title":"MSSQL Paging","author":"anydragon","date":"2021\ub144 02\uc6d4 05\uc77c","format":false,"excerpt":"SELECT row_number() OVER(ORDER BY fd_nIdService DESC) AS PagedNumber, * FROM [tb_Service] AS [t] WHERE 1=1 ORDER BY [fd_nIdService] DESC OFFSET ((2 - 1) * 10) ROWS FETCH NEXT 10 ROWS ONLY \u00a0","rel":"","context":"&quot;Programming&quot;\uc5d0\uc11c","block_context":{"text":"Programming","link":"https:\/\/anyons.net\/?cat=96"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/anyons.net\/index.php?rest_route=\/wp\/v2\/posts\/1784","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/anyons.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/anyons.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/anyons.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/anyons.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1784"}],"version-history":[{"count":0,"href":"https:\/\/anyons.net\/index.php?rest_route=\/wp\/v2\/posts\/1784\/revisions"}],"wp:attachment":[{"href":"https:\/\/anyons.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1784"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/anyons.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1784"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/anyons.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1784"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}