今天犯了个很2B的错误,给insert加上了where语句,解决办法
if exists (select * from table1 where mid='aa')
INSERT INTO table1(mid,name,msg) VALUES('aa','bb','cc')