MYSQL INSERT INTO SELECT 不插入重複數據

INSERT INTO `b_common_member_count` (uid) SELECT uid FROM `b_common_member` WHERE uid NOT IN (SELECT uid FROM `b_common_member_count`)ui

 

把b_common_member裏的uid,不重複的所有插入到b_common_member_count的uid裏。ember

相關文章
相關標籤/搜索