首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > Mysql >

关于exists的SQL语句解决方法

2012-02-02 
关于exists的SQL语句ifnotexists(select*fromstackwhere`name` Homepageand`directory`and`file` index

关于exists的SQL语句
if   not   exists(select   *   from   stack   where   `name`= 'Homepage '   and   `directory`= ' '   and   `file`= 'index.html ')   insert   into   stack(`name`,`directory`,`file`)   values( 'Homepage ', ' ', 'index.html ')

这样的SQL语句在MYSQL   5.0中如何改写才能达到原有的效果

[解决办法]
靠。。就这么简单的东东还搞什么这样那样的。

直接一条搞定:

replace into ....

不老你有没有。你都得给老子有。

你那上面搞那么多的语句,效率角度考虑不可取!

热点排行