{"id":1192,"date":"2012-09-17T23:47:20","date_gmt":"2012-09-17T15:47:20","guid":{"rendered":"https:\/\/yangtingkun.net\/?p=1192"},"modified":"2012-11-04T21:48:10","modified_gmt":"2012-11-04T13:48:10","slug":"sqlplus%e5%b0%8f%e6%8a%80%e5%b7%a7%e5%b8%a6%e8%a1%8c%e5%8f%b7plsql%e7%9a%84%e7%b2%98%e8%b4%b4","status":"publish","type":"post","link":"https:\/\/yangtingkun.net\/?p=1192","title":{"rendered":"SQLPLUS\u5c0f\u6280\u5de7\u5e26\u884c\u53f7PLSQL\u7684\u7c98\u8d34"},"content":{"rendered":"<p>\u524d\u4e24\u5929\u5199\u4e86\u4e00\u7bc7\u5982\u4f55\u5728SQLPLUS\u4e2d\u7c98\u8d34SQL\u8bed\u53e5\uff0c\u4f46\u662f\u6539\u65b9\u6cd5\u5bf9\u4e8eSQL\u6709\u6548\uff0c\u5bf9\u4e8ePL\/SQL\u8bed\u53e5\u5219\u5b58\u5728\u4e00\u4e9b\u5c0f\u95ee\u9898\u3002<br \/>\nSQLPLUS\u5c0f\u6280\u5de7\u5e26\u884c\u53f7SQL\u7684\u7c98\u8d34\uff1a<a href=\"https:\/\/yangtingkun.net\/?p=1167\">https:\/\/yangtingkun.net\/?p=1167<\/a><br \/>\n\u8fd8\u662f\u5728sqlplus\u4e2d\u7c98\u8d34\u5e26\u884c\u53f7\u7684\u95ee\u9898\uff0c\u5bf9\u4e8ePL\/SQL\uff0c\u4e4b\u524d\u7ed9\u51fa\u7684\u65b9\u6cd5\u5b58\u5728\u95ee\u9898\uff1a<\/p>\n<pre lang='SQL'>SQL> DECLARE\r\n  2  V_NUM NUMBER;\r\n  3  BEGIN\r\n  4  FOR I IN 1..10000 LOOP\r\n  5  NULL;\r\n  6  END LOOP;\r\n  7  END;\r\n  8  \/\r\nPL\/SQL procedure successfully completed.\r\nSQL> DECLARE\r\n  2  .\r\nSQL>   2  V_NUM NUMBER;\r\nSQL>   3  BEGIN\r\nSQL>   4  FOR I IN 1..10000 LOOP\r\nSQL>   5  NULL;\r\nSQL>   6  END LOOP;\r\nSQL>   7  END;\r\nSQL> R\r\n  1  DECLARE\r\n  2   V_NUM NUMBER\r\n  3   BEGIN\r\n  4   FOR I IN 1..10000 LOOP\r\n  5   NULL\r\n  6   END LOOP\r\n  7*  END\r\n BEGIN\r\n *\r\nERROR at line 3:\r\nORA-06550: line 3, column 2:\r\nPLS-00103: Encountered the symbol \"BEGIN\" when expecting one of the following:\r\n:= . ( @ % ; not null range default character\r\nThe symbol \";\" was substituted for \"BEGIN\" to continue.\r\nORA-06550: line 6, column 2:\r\nPLS-00103: Encountered the symbol \"END\" when expecting one of the following:\r\n;<\/pre>\n<p>\u5176\u5b9e\u5bfc\u81f4\u95ee\u9898\u7684\u6839\u6e90\u5f88\u7b80\u5355\uff0c\u5c31\u662f\u5206\u53f7;\u9020\u6210\u7684\u3002\u5bf9\u4e8eSQL\u8bed\u53e5\uff0c\u5206\u53f7\u4f5c\u4e3a\u8bed\u53e5\u7684\u7ed3\u675f\u7b26\uff0c\u800c\u5bf9\u4e8ePL\/SQL\u8bed\u53e5\u5219\u4e0d\u7136\uff0c\u56e0\u6b64\u5728\u7c98\u8d34\u7684\u8fc7\u7a0b\u4e2d\uff0c\u6240\u6709\u7684\u5206\u53f7\u4e22\u5931\uff0c\u9020\u6210\u4e86PL\/SQL\u8bed\u53e5\u7684\u9519\u8bef\u3002<br \/>\n\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\u5f88\u7b80\u5355\uff0c\u65b9\u6cd5\u548c\u7c98\u8d34SQL\u5e76\u65e0\u5dee\u522b\uff0c\u552f\u4e00\u9700\u8981\u505a\u7684\u662f\uff0c\u5728\u7c98\u8d34PL\/SQL\u4ee3\u7801\u524d\u5c06SQL\u8bed\u53e5\u7684\u7ec8\u7ed3\u7b26\u6539\u4e3a\/\uff1a<\/p>\n<pre lang='SQL'>SQL> SHOW SQLT\r\nsqlterminator \";\" (hex 3b)\r\nSQL> SET SQLT '\/'\r\nSQL> DECLARE\r\n  2  .\r\nSQL>   2  V_NUM NUMBER;\r\nSQL>   3  BEGIN\r\nSQL>   4  FOR I IN 1..10000 LOOP\r\nSQL>   5  NULL;\r\nSQL>   6  END LOOP;\r\nSQL>   7  END;\r\nSQL> R\r\n  1  DECLARE\r\n  2   V_NUM NUMBER;\r\n  3   BEGIN\r\n  4   FOR I IN 1..10000 LOOP\r\n  5   NULL;\r\n  6   END LOOP;\r\n  7*  END;\r\nPL\/SQL procedure successfully completed.<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u4e24\u5929\u5199\u4e86\u4e00\u7bc7\u5982\u4f55\u5728SQLPLUS\u4e2d\u7c98\u8d34SQL\u8bed\u53e5\uff0c\u4f46\u662f\u6539\u65b9\u6cd5\u5bf9\u4e8eSQL\u6709\u6548\uff0c\u5bf9\u4e8ePL\/SQL\u8bed\u53e5\u5219\u5b58\u5728\u4e00\u4e9b\u5c0f\u95ee\u9898\u3002 SQLPLUS\u5c0f\u6280\u5de7\u5e26\u884c\u53f7SQL\u7684\u7c98\u8d34\uff1ahttps:\/\/yangtingkun.net\/?p=1167 \u8fd8\u662f\u5728sqlplus\u4e2d\u7c98\u8d34\u5e26\u884c\u53f7\u7684\u95ee\u9898\uff0c\u5bf9\u4e8ePL\/SQL\uff0c\u4e4b\u524d\u7ed9\u51fa\u7684\u65b9\u6cd5\u5b58\u5728\u95ee\u9898\uff1a SQL> DECLARE 2 V_NUM NUMBER; 3 BEGIN 4 FOR I IN 1..10000 LOOP 5 NULL; 6 END LOOP; 7 END; 8 \/ PL\/SQL procedure successfully completed. SQL> DECLARE 2 . SQL> 2 V_NUM NUMBER; SQL> 3 BEGIN &hellip; <a href=\"https:\/\/yangtingkun.net\/?p=1192\">Continue reading <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":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3],"tags":[1020,1018,674,593,102,1050],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p2yiY3-je","_links":{"self":[{"href":"https:\/\/yangtingkun.net\/index.php?rest_route=\/wp\/v2\/posts\/1192"}],"collection":[{"href":"https:\/\/yangtingkun.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/yangtingkun.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/yangtingkun.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/yangtingkun.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1192"}],"version-history":[{"count":1,"href":"https:\/\/yangtingkun.net\/index.php?rest_route=\/wp\/v2\/posts\/1192\/revisions"}],"predecessor-version":[{"id":1194,"href":"https:\/\/yangtingkun.net\/index.php?rest_route=\/wp\/v2\/posts\/1192\/revisions\/1194"}],"wp:attachment":[{"href":"https:\/\/yangtingkun.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1192"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/yangtingkun.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1192"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/yangtingkun.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1192"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}