mysql 防止插入某个字段重复的值
INSERT INTO `cw_integral_student` (studentId)
SELECT 9 ------------------------- 9 用于占位
from DUAL --------------------------DUAL 是临时表的意思
WHERE NOT EXISTS (
select studentId
from cw_integral_student
WHERE studentId = 9
)