{"id":46,"date":"2015-08-24T11:21:49","date_gmt":"2015-08-24T11:21:49","guid":{"rendered":"http:\/\/www.hadooh.com\/?p=46"},"modified":"2015-08-24T11:21:49","modified_gmt":"2015-08-24T11:21:49","slug":"wm_concat-%ea%b3%bc-listagg","status":"publish","type":"post","link":"https:\/\/www.hadooh.com\/?p=46","title":{"rendered":"WM_CONCAT \uacfc LISTAGG"},"content":{"rendered":"<p>oracle 10g<br \/>\nSELECT A2.TABLE_NAME, WM_CONCAT(A2.COLUMN_NAME) AS &#8220;COLUMN_NAME&#8221;<br \/>\nFROM ALL_CONSTRAINTS A1, ALL_CONS_COLUMNS A2<br \/>\nWHERE UPPER(A1.TABLE_NAME) LIKE &#8216;TB_M30%&#8217;<br \/>\nAND UPPER(A1.OWNER) = &#8216;MESUSER&#8217;<br \/>\nAND A1.TABLE_NAME = A2.TABLE_NAME<br \/>\nAND A1.OWNER = A2.OWNER<br \/>\nAND A1.CONSTRAINT_NAME = A2.CONSTRAINT_NAME<br \/>\nAND A1.CONSTRAINT_TYPE = &#8216;P&#8217;<br \/>\nGROUP BY A2.TABLE_NAME<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n<p>oracle 11g<br \/>\nSELECT A2.TABLE_NAME, LISTAGG(A2.COLUMN_NAME, &#8216;,&#8217;) WITHIN GROUP (ORDER BY A2.POSITION) &#8220;COLUMN_NAME&#8221;<br \/>\nFROM ALL_CONSTRAINTS A1, ALL_CONS_COLUMNS A2<br \/>\nWHERE UPPER(A1.TABLE_NAME) LIKE &#8216;TB_M30%&#8217;<br \/>\nAND UPPER(A1.OWNER) = &#8216;MESUSER&#8217;<br \/>\nAND A1.TABLE_NAME = A2.TABLE_NAME<br \/>\nAND A1.OWNER = A2.OWNER<br \/>\nAND A1.CONSTRAINT_NAME = A2.CONSTRAINT_NAME<br \/>\nAND A1.CONSTRAINT_TYPE = &#8216;P&#8217;<br \/>\nGROUP BY A2.TABLE_NAME<\/p>\n","protected":false},"excerpt":{"rendered":"<p>oracle 10g SELECT A2.TABLE_NAME, WM_CONCAT(A2.COLUMN_NAME) AS &#8220;COLUMN_NAME&#8221; FROM ALL_CONSTRAINTS A1, ALL_CONS_COLUMNS A2 WHERE UPPER(A1.TABLE_NAME) LIKE &#8216;TB_M30%&#8217; AND UPPER(A1.OWNER) = &#8216;MESUSER&#8217; AND A1.TABLE_NAME = A2.TABLE_NAME AND A1.OWNER = A2.OWNER AND A1.CONSTRAINT_NAME = A2.CONSTRAINT_NAME AND A1.CONSTRAINT_TYPE = &#8216;P&#8217; GROUP BY A2.TABLE_NAME &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- oracle 11g SELECT A2.TABLE_NAME, LISTAGG(A2.COLUMN_NAME, &#8216;,&#8217;) WITHIN GROUP (ORDER BY A2.POSITION) &#8220;COLUMN_NAME&#8221; FROM ALL_CONSTRAINTS A1, &hellip; <a href=\"https:\/\/www.hadooh.com\/?p=46\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">WM_CONCAT \uacfc LISTAGG<\/span> <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":[2],"tags":[],"_links":{"self":[{"href":"https:\/\/www.hadooh.com\/index.php?rest_route=\/wp\/v2\/posts\/46"}],"collection":[{"href":"https:\/\/www.hadooh.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hadooh.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hadooh.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hadooh.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=46"}],"version-history":[{"count":1,"href":"https:\/\/www.hadooh.com\/index.php?rest_route=\/wp\/v2\/posts\/46\/revisions"}],"predecessor-version":[{"id":47,"href":"https:\/\/www.hadooh.com\/index.php?rest_route=\/wp\/v2\/posts\/46\/revisions\/47"}],"wp:attachment":[{"href":"https:\/\/www.hadooh.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=46"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hadooh.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=46"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hadooh.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=46"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}