{"id":5306,"date":"2024-11-14T13:09:16","date_gmt":"2024-11-14T05:09:16","guid":{"rendered":"https:\/\/fwq.ai\/blog\/5306\/"},"modified":"2024-11-14T13:09:16","modified_gmt":"2024-11-14T05:09:16","slug":"oracle%e5%bd%93%e5%89%8d%e6%97%b6%e9%97%b4%e6%80%8e%e4%b9%88%e8%a1%a8%e7%a4%ba","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/5306\/","title":{"rendered":"oracle\u5f53\u524d\u65f6\u95f4\u600e\u4e48\u8868\u793a"},"content":{"rendered":"<blockquote><p>\n  oracle \u4e2d\u83b7\u53d6\u5f53\u524d\u65f6\u95f4\u7684\u51fd\u6570\u6709\uff1asystimestamp \u51fd\u6570\u8fd4\u56de\u7cfb\u7edf\u65f6\u95f4\uff0c\u5305\u62ec\u65e5\u671f\u548c\u65f6\u95f4\u3002current_timestamp \u51fd\u6570\u4e0e systimestamp \u51fd\u6570\u76f8\u540c\uff0c\u7528\u4e8e\u83b7\u53d6\u5f53\u524d\u65f6\u95f4\u3002now \u51fd\u6570\u4e5f\u53ef\u83b7\u53d6\u5f53\u524d\u65f6\u95f4\uff0c\u4f46\u57fa\u4e8e\u5ba2\u6237\u7aef\u65f6\u95f4\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202405\/26\/2024052619031813348.jpg\" class=\"aligncenter\" title=\"oracle\u5f53\u524d\u65f6\u95f4\u600e\u4e48\u8868\u793a\u63d2\u56fe\" alt=\"oracle\u5f53\u524d\u65f6\u95f4\u600e\u4e48\u8868\u793a\u63d2\u56fe\" \/><\/p>\n<p><strong>Oracle \u4e2d\u83b7\u53d6\u5f53\u524d\u65f6\u95f4\u7684\u51fd\u6570<\/strong><\/p>\n<p>\u5728 Oracle \u6570\u636e\u5e93\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u51fd\u6570\u83b7\u53d6\u5f53\u524d\u65f6\u95f4\uff1a<\/p>\n<p><strong>SYSTIMESTAMP<\/strong><\/p>\n<p>SYSTIMESTAMP \u51fd\u6570\u8fd4\u56de\u5f53\u524d\u7cfb\u7edf\u65f6\u95f4\uff0c\u5176\u4e2d\u5305\u542b\u65e5\u671f\u548c\u65f6\u95f4\u7ec4\u4ef6\u3002\u5176\u8bed\u6cd5\u5982\u4e0b\uff1a<\/p>\n<pre>SYSTIMESTAMP()<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>CURRENT_TIMESTAMP<\/strong><\/p>\n<p>CURRENT_TIMESTAMP \u51fd\u6570\u4e0e SYSTIMESTAMP \u51fd\u6570\u76f8\u540c\uff0c\u7528\u4e8e\u83b7\u53d6\u5f53\u524d\u7cfb\u7edf\u65f6\u95f4\u3002\u5176\u8bed\u6cd5\u5982\u4e0b\uff1a<\/p>\n<pre>CURRENT_TIMESTAMP()<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>NOW<\/strong><\/p>\n<p>NOW \u51fd\u6570\u540c\u6837\u53ef\u7528\u4e8e\u83b7\u53d6\u5f53\u524d\u7cfb\u7edf\u65f6\u95f4\uff0c\u4f46\u5b83\u662f\u4e00\u4e2a\u4f2a\u51fd\u6570\uff0c\u800c\u975e\u6807\u51c6\u7684 SQL \u51fd\u6570\u3002\u5176\u8bed\u6cd5\u5982\u4e0b\uff1a<\/p>\n<pre>NOW()<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>\u793a\u4f8b<\/strong><\/p>\n<p>\u4ee5\u4e0b\u793a\u4f8b\u4f7f\u7528 SYSTIMESTAMP \u51fd\u6570\u83b7\u53d6\u5f53\u524d\u65f6\u95f4\uff1a<\/p>\n<pre>SELECT SYSTIMESTAMP() AS current_time FROM dual;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u8f93\u51fa\u5c06\u7c7b\u4f3c\u4e8e\uff1a<\/p>\n<pre>CURRENT_TIME\n--------------------------\n2023-03-08 14:32:12.345000000<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>\u6ce8\u610f\uff1a<\/strong><\/p>\n<ul>\n<li>SYSTIMESTAMP \u548c CURRENT_TIMESTAMP \u51fd\u6570\u8fd4\u56de\u7684\u503c\u57fa\u4e8e\u670d\u52a1\u5668\u7aef\u7684\u65f6\u95f4\uff0c\u56e0\u6b64\u5728\u4e0d\u540c\u65f6\u533a\u53ef\u80fd\u4f1a\u663e\u793a\u4e0d\u540c\u7684\u65f6\u95f4\u3002<\/li>\n<li>NOW \u51fd\u6570\u8fd4\u56de\u7684\u503c\u57fa\u4e8e\u5ba2\u6237\u7aef\u7684\u65f6\u95f4\uff0c\u56e0\u6b64\u5982\u679c\u5ba2\u6237\u7aef\u548c\u670d\u52a1\u5668\u4f4d\u4e8e\u4e0d\u540c\u7684\u65f6\u533a\uff0c\u5219\u663e\u793a\u7684\u65f6\u95f4\u53ef\u80fd\u4e0d\u51c6\u786e\u3002<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5f53\u524d\u65f6\u95f4\u600e\u4e48\u8868\u793a\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u7f51\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>oracle \u4e2d\u83b7\u53d6\u5f53\u524d\u65f6\u95f4\u7684\u51fd\u6570\u6709\uff1asystimestamp \u51fd\u6570\u8fd4\u56de\u7cfb\u7edf\u65f6\u95f4\uff0c\u5305\u62ec\u65e5\u671f\u548c\u65f6\u95f4\u3002current_timestamp \u51fd\u6570\u4e0e systimestamp \u51fd\u6570\u76f8\u540c\uff0c\u7528\u4e8e\u83b7\u53d6\u5f53\u524d\u65f6\u95f4\u3002now \u51fd\u6570\u4e5f\u53ef\u83b7\u53d6\u5f53\u524d\u65f6\u95f4\uff0c\u4f46\u57fa\u4e8e\u5ba2\u6237\u7aef\u65f6\u95f4\u3002 Oracle \u4e2d\u83b7\u53d6\u5f53\u524d\u65f6\u95f4\u7684\u51fd\u6570 \u5728 Oracle \u6570\u636e\u5e93\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u51fd\u6570\u83b7\u53d6\u5f53\u524d\u65f6\u95f4\uff1a SYSTIMESTAMP SYSTIMESTAMP \u51fd\u6570\u8fd4\u56de\u5f53\u524d\u7cfb\u7edf\u65f6\u95f4\uff0c\u5176\u4e2d\u5305\u542b\u65e5\u671f\u548c\u65f6\u95f4\u7ec4\u4ef6\u3002\u5176\u8bed\u6cd5\u5982\u4e0b\uff1a SYSTIMESTAMP() \u767b\u5f55\u540e\u590d\u5236 CURRENT_TIMESTAMP CURRENT_TIMESTAMP \u51fd\u6570\u4e0e SYSTIMESTAMP \u51fd\u6570\u76f8\u540c\uff0c\u7528\u4e8e\u83b7\u53d6\u5f53\u524d\u7cfb\u7edf\u65f6\u95f4\u3002\u5176\u8bed\u6cd5\u5982\u4e0b\uff1a CURRENT_TIMESTAMP() \u767b\u5f55\u540e\u590d\u5236 NOW NOW \u51fd\u6570\u540c\u6837\u53ef\u7528\u4e8e\u83b7\u53d6\u5f53\u524d\u7cfb\u7edf\u65f6\u95f4\uff0c\u4f46\u5b83\u662f\u4e00\u4e2a\u4f2a\u51fd\u6570\uff0c\u800c\u975e\u6807\u51c6\u7684 SQL \u51fd\u6570\u3002\u5176\u8bed\u6cd5\u5982\u4e0b\uff1a NOW() \u767b\u5f55\u540e\u590d\u5236 \u793a\u4f8b \u4ee5\u4e0b\u793a\u4f8b\u4f7f\u7528 SYSTIMESTAMP \u51fd\u6570\u83b7\u53d6\u5f53\u524d\u65f6\u95f4\uff1a SELECT SYSTIMESTAMP() AS current_time FROM dual; \u767b\u5f55\u540e\u590d\u5236 \u8f93\u51fa\u5c06\u7c7b\u4f3c\u4e8e\uff1a CURRENT_TIME &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; 2023-03-08 14:32:12.345000000 \u767b\u5f55\u540e\u590d\u5236 \u6ce8\u610f\uff1a SYSTIMESTAMP \u548c CURRENT_TIMESTAMP \u51fd\u6570\u8fd4\u56de\u7684\u503c\u57fa\u4e8e\u670d\u52a1\u5668\u7aef\u7684\u65f6\u95f4\uff0c\u56e0\u6b64\u5728\u4e0d\u540c\u65f6\u533a\u53ef\u80fd\u4f1a\u663e\u793a\u4e0d\u540c\u7684\u65f6\u95f4\u3002 NOW \u51fd\u6570\u8fd4\u56de\u7684\u503c\u57fa\u4e8e\u5ba2\u6237\u7aef\u7684\u65f6\u95f4\uff0c\u56e0\u6b64\u5982\u679c\u5ba2\u6237\u7aef\u548c\u670d\u52a1\u5668\u4f4d\u4e8e\u4e0d\u540c\u7684\u65f6\u533a\uff0c\u5219\u663e\u793a\u7684\u65f6\u95f4\u53ef\u80fd\u4e0d\u51c6\u786e\u3002 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-5306","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/5306","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=5306"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/5306\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=5306"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=5306"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=5306"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}