首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

——这条SQL语句在MYSQL中如何报错

2012-04-23 
在线等——这条SQL语句在MYSQL中怎么报错?if not exists(select ID from jc_mobile_area_contrast where num

在线等——这条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语法不一样

热点排行