关于exists的SQL语句解决方法

关于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 ….

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

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

关于exists的SQL语句解决方法

相关文章:

你感兴趣的文章:

标签云: