SQL语句 select * from 表 where 字段=:字段     是什么意思
还有 select * from 表 where 1=1           又是什么意思、?求答复

解决方案 »

  1.   

    1=1 为真 等同 select * from tb
      

  2.   

    where 是查询条件
    比方说 一个book表 你想查找《C#》这本书 你就可以这样写
    select * from book where bookName='《C#》'
      

  3.   

    方便where条件的 字符串拼接用 
      

  4.   

    where 条件 1=1 为全部数据
      

  5.   

    请问你这个回答是对于 select * from 表 where 字段=:字段 是什么意思
    的回答吗
      

  6.   

    where 1 =1 参考
    =: 没弄过 。
      

  7.   

    1 你这应该是oracle或PB语言等,给变量赋值http://topic.csdn.net/u/20070405/11/002d6eb9-9d2f-41b3-a0e9-7c290c459b61.html2 select * from 表 where 1=1 又是什么意思、?拼SQL条件  and  条件1  +and  条件2  +。
      

  8.   

    有时候需要去表的结构出来,所以就select * from 表 where 1<>1
    1=1不喜欢用
      

  9.   

    select * from 表 where 字段=:字段
    应该是: select * from 表 where 字段= :字段
    在开发语言中嵌入的SQL中有这种表达方式,这是表示一个参数;
      

  10.   

    select * from 表 where 字段= :字段
    好像是PB的东西
    select * from 表 where 字段= :变量