#去重插入
INSERT INTO bas_student_class(student_number,class_id) select 12345,3 FROM DUAL WHERE NOT EXISTS (SELECT * FROM bas_student_class WHERE student_number=12345 and class_id=3);
mysql去重插入
最新推荐文章于 2024-04-10 09:32:20 发布
#去重插入
INSERT INTO bas_student_class(student_number,class_id) select 12345,3 FROM DUAL WHERE NOT EXISTS (SELECT * FROM bas_student_class WHERE student_number=12345 and class_id=3);