mysql 中使用INSERT ... ON DUPLICATE KEY UPDATE(insert ignore)
摘要:
这个语句非常好,例如:IF(SELECT * FROM test.relation_seo_keyword_webpage WHERE keywordid = 1 AND webpageid =1){ UPDATE test.relation_seo_keyword_webpage SET positionCount= positionCount+1,searchCount = searchCount +1 WHERE keywordid = 1 AND webpageid =1;}ELSE{ INSERT INTO test.relation_seo_keyword... 阅读全文
posted @ 2012-01-07 18:42 blackcore 阅读(4508) 评论(0) 推荐(2) 编辑