{"id":31,"date":"2003-09-02T11:10:58","date_gmt":"2003-09-02T01:10:58","guid":{"rendered":"http:\/\/www.thunderguy.com\/plusplus\/20050422\/oracle-testing-with-the-dual-table\/"},"modified":"2005-08-02T10:33:03","modified_gmt":"2005-08-02T00:33:03","slug":"oracle-testing-with-the-dual-table","status":"publish","type":"post","link":"https:\/\/thunderguy.com\/semicolon\/2003\/09\/02\/oracle-testing-with-the-dual-table\/","title":{"rendered":"Oracle testing with the DUAL table"},"content":{"rendered":"<p>This feature is a hack intended for testing, but it&#8217;s built in to every Oracle installation.<\/p>\n<p>DUAL is a table automatically created by Oracle and accessible to all users. It has one column, DUMMY, containing one row. It&#8217;s useful for selecting a constant or expression, because the table always exists (so the query will succeed) and the result will only be returned once (since there&#8217;s exactly one row in the table).<\/p>\n<p>For example:<\/p>\n<pre class=\"code\">\r\n<code>SELECT ASCII('A') FROM DUAL;\r\n \r\nASCII('A')\r\n----------\r\n        65<\/code>\r\n<\/pre>\n<p>See the <a href=\"http:\/\/download-west.oracle.com\/docs\/cd\/A87860_01\/doc\/server.817\/a85397\/expressi.htm#1023281\">Oracle 8 manual, section 5-28<\/a> (registration required) for more details.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This feature is a hack intended for testing, but it&#8217;s built in to every Oracle installation. DUAL is a table automatically created by Oracle and accessible to all users. It has one column, DUMMY, containing one row. It&#8217;s useful for selecting a constant or expression, because the table always exists (so the query will succeed) [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[5,7],"class_list":["post-31","post","type-post","status-publish","format-standard","hentry","tag-sql","tag-testing"],"_links":{"self":[{"href":"https:\/\/thunderguy.com\/semicolon\/wp-json\/wp\/v2\/posts\/31","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thunderguy.com\/semicolon\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thunderguy.com\/semicolon\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thunderguy.com\/semicolon\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/thunderguy.com\/semicolon\/wp-json\/wp\/v2\/comments?post=31"}],"version-history":[{"count":0,"href":"https:\/\/thunderguy.com\/semicolon\/wp-json\/wp\/v2\/posts\/31\/revisions"}],"wp:attachment":[{"href":"https:\/\/thunderguy.com\/semicolon\/wp-json\/wp\/v2\/media?parent=31"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thunderguy.com\/semicolon\/wp-json\/wp\/v2\/categories?post=31"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thunderguy.com\/semicolon\/wp-json\/wp\/v2\/tags?post=31"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}