blob: 0e0ac484c9b6e19ee8ae50d482d20065f9f27f6e [file] [log] [blame]
"use strict";(self.webpackChunkdoris_website=self.webpackChunkdoris_website||[]).push([[71414],{15680:(e,n,t)=>{t.d(n,{xA:()=>u,yg:()=>y});var r=t(296540);function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function s(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function i(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?s(Object(t),!0).forEach((function(n){o(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):s(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function a(e,n){if(null==e)return{};var t,r,o=function(e,n){if(null==e)return{};var t,r,o={},s=Object.keys(e);for(r=0;r<s.length;r++)t=s[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)t=s[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var c=r.createContext({}),l=function(e){var n=r.useContext(c),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},u=function(e){var n=l(e.components);return r.createElement(c.Provider,{value:n},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},p=r.forwardRef((function(e,n){var t=e.components,o=e.mdxType,s=e.originalType,c=e.parentName,u=a(e,["components","mdxType","originalType","parentName"]),d=l(t),p=o,y=d["".concat(c,".").concat(p)]||d[p]||m[p]||s;return t?r.createElement(y,i(i({ref:n},u),{},{components:t})):r.createElement(y,i({ref:n},u))}));function y(e,n){var t=arguments,o=n&&n.mdxType;if("string"==typeof e||o){var s=t.length,i=new Array(s);i[0]=p;var a={};for(var c in n)hasOwnProperty.call(n,c)&&(a[c]=n[c]);a.originalType=e,a[d]="string"==typeof e?e:o,i[1]=a;for(var l=2;l<s;l++)i[l]=t[l];return r.createElement.apply(null,i)}return r.createElement.apply(null,t)}p.displayName="MDXCreateElement"},806924:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>i,default:()=>m,frontMatter:()=>s,metadata:()=>a,toc:()=>l});var r=t(58168),o=(t(296540),t(15680));const s={title:"microseconds_sub",language:"zh-CN"},i=void 0,a={unversionedId:"sql-manual/sql-functions/date-time-functions/microseconds_sub",id:"version-1.2/sql-manual/sql-functions/date-time-functions/microseconds_sub",title:"microseconds_sub",description:"\x3c!--",source:"@site/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.2/sql-manual/sql-functions/date-time-functions/microseconds_sub.md",sourceDirName:"sql-manual/sql-functions/date-time-functions",slug:"/sql-manual/sql-functions/date-time-functions/microseconds_sub",permalink:"/zh-CN/docs/1.2/sql-manual/sql-functions/date-time-functions/microseconds_sub",draft:!1,tags:[],version:"1.2",frontMatter:{title:"microseconds_sub",language:"zh-CN"},sidebar:"docs",previous:{title:"microseconds_add",permalink:"/zh-CN/docs/1.2/sql-manual/sql-functions/date-time-functions/microseconds_add"},next:{title:"minutes_add",permalink:"/zh-CN/docs/1.2/sql-manual/sql-functions/date-time-functions/minutes_add"}},c={},l=[{value:"microseconds_sub",id:"microseconds_sub",level:2},{value:"description",id:"description",level:3},{value:"Syntax",id:"syntax",level:4},{value:"example",id:"example",level:3},{value:"keywords",id:"keywords",level:3}],u={toc:l},d="wrapper";function m(e){let{components:n,...t}=e;return(0,o.yg)(d,(0,r.A)({},u,t,{components:n,mdxType:"MDXLayout"}),(0,o.yg)("h2",{id:"microseconds_sub"},"microseconds_sub"),(0,o.yg)("h3",{id:"description"},"description"),(0,o.yg)("h4",{id:"syntax"},"Syntax"),(0,o.yg)("p",null,(0,o.yg)("inlineCode",{parentName:"p"},"DATETIMEV2 microseconds_sub(DATETIMEV2 basetime, INT delta)")),(0,o.yg)("ul",null,(0,o.yg)("li",{parentName:"ul"},"basetime: DATETIMEV2 \u7c7b\u578b\u8d77\u59cb\u65f6\u95f4"),(0,o.yg)("li",{parentName:"ul"},"delta: \u4ece basetime \u8d77\u9700\u8981\u6263\u51cf\u7684\u5fae\u79d2\u6570"),(0,o.yg)("li",{parentName:"ul"},"\u8fd4\u56de\u7c7b\u578b\u4e3a DATETIMEV2")),(0,o.yg)("h3",{id:"example"},"example"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre"},"mysql> select now(3), microseconds_sub(now(3), 100000);\n+-------------------------+----------------------------------+\n| now(3) | microseconds_sub(now(3), 100000) |\n+-------------------------+----------------------------------+\n| 2023-02-25 02:03:05.174 | 2023-02-25 02:03:05.074 |\n+-------------------------+----------------------------------+\n")),(0,o.yg)("p",null,(0,o.yg)("inlineCode",{parentName:"p"},"now(3)")," \u8fd4\u56de\u7cbe\u5ea6\u4f4d\u6570 3 \u7684 DATETIMEV2 \u7c7b\u578b\u5f53\u524d\u65f6\u95f4\uff0c",(0,o.yg)("inlineCode",{parentName:"p"},"microseconds_add(now(3), 100000)")," \u8fd4\u56de\u5f53\u524d\u65f6\u95f4\u51cf\u53bb 100000 \u5fae\u79d2\u540e\u7684 DATETIMEV2 \u7c7b\u578b\u65f6\u95f4"),(0,o.yg)("h3",{id:"keywords"},"keywords"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre"},"microseconds_sub\n")))}m.isMDXComponent=!0}}]);