One - One Code All

Blog Content

问答:mysql重复值插入问题

MySQL   2018-04-10 17:24:05

有以前的同事Fox来问了一个技术问题:

Fox:mysql 联合索引  插入的时候已经有数据了,会报错,怎么关闭错误返回false?

Fox:不想在PHP里面判断。

我:语句吧。

我:insert ignore into

Fox: 666

Fox: 你是不是用过?

Fox: 我怎么有点印象.

我:直接用。

Fox: 我知道。


上一篇:查看mysql数据库容量大小
下一篇:mac mysql导出数据找不到mysqldump

The minute you think of giving up, think of the reason why you held on so long.