select * from table where 1=1 and username='my'这是标准SQL,一样的写法。||======================================||
||       欢迎访问叶屋资源网             ||
||         http://yewin.myrcie.com/     ||
||       WEB系统开发WEB网站开发         ||
||       ASP+SQL Server  水晶报表       ||
||======================================||

解决方案 »

  1.   

    select * from table where 1=1 and username='my'
    正确
    连接可以类似
    sql="select * from table where " + "1=1" + " and username='" + 字符串变量 + "'"
    其中"1=1"也可以换成字符串变量
      

  2.   


    友联创新系统集成有限公司(北京上地)
    在天津招聘
    熟悉oracle 有相关工作经验 学过c语言
    工作地点:天津
    其它事项面谈
    有意象请将简历发至
    [email protected] 
    [email protected]
    联系人:王先生