mysql avoid duplication of data inserted ignore

Table ignore ensure no duplicate data insertion.

 Now we insert tags into a data table, the primary key is auto-incremented.

The first time you insert data, insert data successfully.

The second insertion of the same data, 0 is returned attention here. Success is not inserted.

We look at the data in the table, only one data.

 

 

 

Published 272 original articles · won praise 19 · views 20000 +

Guess you like

Origin blog.csdn.net/hello_cmy/article/details/104748745