Home >Database >Mysql Tutorial >Mysql另一种插入语法(如果唯一冲突,则不插入,执行更新)_MySQL

Mysql另一种插入语法(如果唯一冲突,则不插入,执行更新)_MySQL

WBOY
WBOYOriginal
2016-06-01 13:41:471090browse

bitsCN.com Mysql另一种插入语法(如果唯一冲突,则不插入,执行更新) INSERT INTO tbl_user_private_info (user_id, nick_name, sex, sub_type, device_type, tag)  values( inUserId, inNickName, inSex, inSubType, inDeviceType, inTag)   ON DUPLICATE KEY UPDATE nick_name=inNickName,  sex=inSex, sub_type=inSubType,  device_type=inDeviceType, tag=inTag;  作者 C++技术中心 bitsCN.com

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