{"id":602,"date":"2009-12-22T15:00:22","date_gmt":"2009-12-22T20:00:22","guid":{"rendered":"http:\/\/appcrawler.com\/wordpress\/?p=602"},"modified":"2011-07-06T10:13:53","modified_gmt":"2011-07-06T15:13:53","slug":"using-a-cursor-variable-in-sqlplus","status":"publish","type":"post","link":"http:\/\/appcrawler.com\/wordpress\/2009\/12\/22\/using-a-cursor-variable-in-sqlplus\/","title":{"rendered":"Using a cursor variable in SQL*Plus"},"content":{"rendered":"<p>Below is a simple example of opening a cursor variable in SQL*Plus and then printing its contents.<\/p>\n<p>DBA&#8217;s can use this if they are not PL\/SQL proficient to do some simple test casing with developer cursor code.<\/p>\n<pre lang=\"plsql\" line=\"1\">\r\nSQL> variable b refcursor\r\nSQL> begin\r\n  2    open :b for select username from dba_users;\r\n  3  end;\r\n  4  \/\r\n\r\nPL\/SQL procedure successfully completed.\r\n\r\nSQL> print b\r\n\r\nUSERNAME\r\n------------------------------\r\nQIANH\r\nHYPER_ACC1_0\r\nHYPER_QRT3\r\n\r\n...snip...\r\n\r\nRMAN\r\nORDPLUGINS\r\nSI_INFORMTN_SCHEMA\r\n\r\n43 rows selected.\r\n\r\nSQL>\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Below is a simple example of opening a cursor variable in SQL*Plus and then printing its contents. DBA&#8217;s can use this if they are not PL\/SQL proficient to do some simple test casing with developer cursor code. SQL> variable b&hellip;<\/p>\n<p class=\"more-link-p\"><a class=\"more-link\" href=\"http:\/\/appcrawler.com\/wordpress\/2009\/12\/22\/using-a-cursor-variable-in-sqlplus\/\">Read more &rarr;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"footnotes":""},"categories":[19,22],"tags":[],"_links":{"self":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts\/602"}],"collection":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/comments?post=602"}],"version-history":[{"count":9,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts\/602\/revisions"}],"predecessor-version":[{"id":924,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts\/602\/revisions\/924"}],"wp:attachment":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/media?parent=602"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/categories?post=602"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/tags?post=602"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}