msyql
Posted zhouj-happy
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了msyql相关的知识,希望对你有一定的参考价值。
数据唯一性
先建立primary index或者unique index:
INSERT IGNORE
REPLACE
https://www.tutorialspoint.com/mysql/mysql-handling-duplicates.htm
https://www.mysqltutorial.org/mysql-insert-ignore/
https://www.runoob.com/mysql/mysql-handling-duplicates.html
INSERT INTO table (a,b,c) VALUES (1,2,3) ON DUPLICATE KEY UPDAT cut = cut +1
INSERT INTO books (name) SELECT ‘mysql Manual‘ FROM dual WHERE NOT EXISTS (SELECT id FROM books WHERE id = 1)
https://blog.csdn.net/java_2017_csdn/article/details/78517789
以上是关于msyql的主要内容,如果未能解决你的问题,请参考以下文章