Home > Backend Development > PHP Tutorial > 怎么只能插入数据

怎么只能插入数据

WBOY
Release: 2016-06-13 12:38:59
Original
728 people have browsed it

如何只能插入数据
在php中,往表中连续插入数据的时候已经知道会有重复的值,但是如何做到只向其中插入不重复的值,重复值自动无法插入呢,不采用unique key,primary Key。


insert into('a','b','c') table_name values ('a1','a2','a3'),('a4','a5','a6'),('a8','a7','a9').表中重复值('a4','a5','a6'),如何做到无法插入('a4','a5','a6'),但是可以插入('a1','a2','a3'),(('a8','a7','a9')。

PHP
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template