日期:2014-05-18  浏览次数:20541 次

在线等——这条SQL语句在MYSQL中怎么报错?
if not exists(select ID from jc_mobile_area_contrast where num = '1300000')
insert into jc_mobile_area_contrast(num,city)VALUES('1300000','北京')

------解决方案--------------------
insert into jc_mobile_area_contrast(num,city) VALUES('1300000','北京') WHERE NOT EXISTS (SELECT * FROM jc_mobile_area_contrastWHERE id = 1300000); 

Sql server和mysql语法不一样