2022年7月12日

MySQL - 获取当前时间/秒级/毫秒级时间戳

摘要: 总结: #当前时间戳(秒级):2020-08-08 12:09:42 select current_timestamp(); #当前时间戳(毫秒级):2020-08-08 12:09:42.192 select current_timestamp(3); # 秒级时间戳:1606371113 (自1 阅读全文

posted @ 2022-07-12 13:40 frank_cui 阅读(14268) 评论(0) 推荐(1)

MySQL - insert into V.S. replace into

摘要: 总结 replace into执行过程,若碰到主键冲突,则是先删除该条记录,再插入新记录。 replace into若主键相同,主键之外字段会得到更新;若主键不同,功能同insert into replace into和insert into区别在于,insert into插入与主键相同记录会报错, 阅读全文

posted @ 2022-07-12 13:37 frank_cui 阅读(34) 评论(0) 推荐(0)

导航

levels of contents