Home  >  Article  >  Database  >  数据存在就更新不存在就插入数据sql语句

数据存在就更新不存在就插入数据sql语句

WBOY
WBOYOriginal
2016-06-07 17:49:541232browse

在mysql网站制作中我们会碰到为了节省一点点资源就要把数据库操作更简单化,如数据存在就更新不存在就插入数据sql语句,下面我们就会用到 insert ON DUPLICATE KEY UPDATE来实例,

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn