(5) MySQL INSERT插入條件判斷:若是不存在則插入 || MySQL中replace into ||INSERT INTO … ON DUPLICATE KEY U...

摘要  咱們常常須要進行sql的批量插入,要求:該條記錄不存在則插入,存在則不插入。若是使用一條INSERT語句實現呢? ##test table: CREATE TABLE IF NOT EXISTS card ( cardno int(10) not null PRIMARY KEY, cardnum int(10) not null )engine=innodb default
相關文章
相關標籤/搜索