mysql 中 insert 大量数据 避免时间戳相同 !!
2024-10-21 09:23:21
时间函数 now() current_timestamp() 和 sysdate()
CURRENT_TIMESTAMP
andCURRENT_TIMESTAMP()
are synonyms forNOW()
.
也就是说 CURRENT_TIMESTAMP
和 CURRENT_TIMESTAMP()
都是 NOW()
这个函数的同义词,所以作用相同,
而sysdate()函数的解释是
SYSDATE()
returns the time at which it executes. This differs from the behavior forNOW()
, which returns a constant time that indicates the time at which the statement began to execute. (Within a stored function or trigger,NOW()
returns the time at which the function or triggering statement began to execute.)
简单来说,now()
(current_timestamp()
)函数获得的是语句开始执行时的时间,而sysdate()
函数是这个函数执行时候的时间。
所以 Insert into tablea (a,b,c,inserttime) select a,b,c,sysdate(3) from tableb
最新文章
- 关于在线编辑器的选择:tinymce - nilcms
- jQuery插件开发(转)
- Django 中url补充以及模板继承
- SpirentTestcenter测试仪的自动化
- JQuery------获取<;input type=";file";>;中的文件内容
- overflow 清除浮动
- ci为什么必须得写构造函数
- c++之路起航——指针
- C#综合揭秘——细说多线程(上)
- 在VS2010 中兼容Qt4和Qt5
- Oracle hextoraw和rawtohex
- curl post参数,接口接收不到数据问题
- Silverlight&#160;中&#160;TreeView&#160;的数据绑定
- Gson的基本使用方法(google)
- 泛型 ";new的性能";
- Mesos源码分析(2): Mesos Master的启动之一
- JS 获取图片标签和所有的图片中的src的正则表达式
- WindowsPE权威指南 第二章 小工具 PEInfo代码的C语言实现
- ubuntu桌面环境安装中文环境
- Hive调优