SQl 语句

if exists
 (select * from table1 where mid='aa')
INSERT INTO table1(mid,name,msg) VALUES('aa','bb','cc')

原文地址:https://www.cnblogs.com/zknu/p/3184259.html