sql where 1=1和 0=1 的作用

可以避免出现这种情况:MySqlStr=”select * from table where“

 

假如我们将上述的语句改为:string MySqlStr=”select * from table where 1=1 ”  就可以很好的追加查询条件了!

 

http://www.cnblogs.com/junyuz/archive/2011/03/10/1979646.html

posted @ 2014-01-04 10:08  isMethod  阅读(119)  评论(0编辑  收藏  举报