1=1在数据库中是什么意识。

解决方案 »

  1.   

    恒成立的条件
    拼条件串时常用到,免得动态加'where'
      

  2.   

    常用 1=2 这类的条件更常用,尤其在 select * into tableanme from tableold where 1=2 用来copy表结构。
      

  3.   

    恒成立的条件
    拼条件串时常用到,免得动态加'where'
      

  4.   

    select * from table where 1=1 ( 条件为 true)
    select * from table where 1=0 ( 条件为 false)
    找个表测试一下就明白了.
      

  5.   

    select * from table where 1=1 ( 条件为 true)
    select * from table where 1=0 ( 条件为 false)
    找个表测试一下就明白了.