MySQL條件插入我很難形成一個條件插入我有具有列(實例、用戶、項)的x_table,其中實例ID是唯一的。只有當用戶沒有給定項時,我才希望插入新行。例如,嘗試插入實例=919191用戶=123項=456Insert into x_table (instance, user, item) values (919191, 123, 456)
ONLY IF there are no rows where user=123 and item=456如能在正確的方向提供任何幫助或指導,將不勝感激。
MySQL條件插入
HUWWW
2019-07-03 16:17:46