{"data":{"site":{"siteMetadata":{"title":"Andrew McDonough","author":"Andrew McDonough","disqusShortname":"andrewmcdonough","siteUrl":"https://www.andrewmcdonough.com"}},"markdownRemark":{"id":"4a46eb7f-2ea9-50c1-b0d7-3618947ea4f6","excerpt":"Example SQL The following is purely for my own reference. Get all tables   SELECT * FROM ALL_TABLES WHERE OWNER = ‘BASE’;   SELECT CONCAT(TABLE NAME,’ SEQ…","html":"<h1>Example SQL</h1>\n<p>The following is purely for my own reference.</p>\n<h2>Get all tables</h2>\n<p>  SELECT * FROM ALL_TABLES WHERE OWNER = ‘BASE’;</p>\n<p>  SELECT CONCAT(TABLE<em>NAME,’</em>SEQ’) FROM ALL_TABLES WHERE OWNER = ‘BASE’;</p>\n<p>  SELECT ‘CREATE SEQUENCE ‘||CONCAT(TABLE<em>NAME,’</em>SEQ’)||’ START WITH 4 INCREMENT BY 1 MINVALUE 1 MAXVALUE 99999999999999999999 CACHE 20 NOCYCLE NOORDER ’\nFROM ALL_TABLES WHERE OWNER = ‘BASE’</p>\n<p>  INSERT INTO BASE.ADDRESS (ID,ADDRESS,PERSON<em>ID, POST</em>CODE,ADDRESS<em>TYPE</em>ID,COUNTRY_ID) VALUES (‘2’,‘Roadside Croft, Netherley, , Stonehaven, , UK, AB39 3QL’,‘2’,”,‘42’,‘10’);</p>\n<h2>Replacing Commas with newlines</h2>\n<p>  UPDATE BASE.ADDRESS SET ADDRESS = TRANSLATE(ADDRESS, ’,’, chr(10)); </p>","frontmatter":{"title":"","date":null,"disqusIdentifier":null,"disqusUrl":null}}},"pageContext":{"slug":"/wiki/example_sql/","previous":{"fields":{"slug":"/wiki/excel_annoyances/"},"frontmatter":{"title":"","disqusIdentifier":null,"disqusUrl":null}},"next":{"fields":{"slug":"/wiki/erlang/"},"frontmatter":{"title":"","disqusIdentifier":null,"disqusUrl":null}}}}