MySQL multiple unique columns, inserting data issu

for example:
has a table in which two columns, title and provenance, are set with unique properties

demand:

,,

attempt operation:
when inserting using the following sql statement, it is found that only one piece of data can be inserted. Limited by the above two unique columns, only one piece of data has been inserted, that is, two unique columns are now in effect at the same time instead of the combination

.
insert into xxx .... ON DUPLICATE KEY UPDATE xxx=xxx;

other ways:
query the data before inserting select, and judge whether the data exists according to the result
does not exist, then insert the data. If it exists, skip this operation

.

current requirements:
A sql statement to solve the problem, similar to the above sql

Thank you for asking for the first time.

Mar.29,2021

thinking is dead.
has been obsessed with how to operate the database. In fact, you can hash the values of two fields in the program, and then set the hash value to be unique in the database, thus solving the problem.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e6141b-45917.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e6141b-45917.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?