单表多条件查询sql语句写法
作者:系统运维 来源:IT科技类资讯 浏览: 【大中小】 发布时间:2025-11-05 13:57:52 评论数:

单表多条复制sql = "select * from T_USER where 1=1 " if(!String.IsNullOrEmpty(txtUserLoginName.Text)){ sql += " and USER_LOGIN_NAME = " + txtUserLoginName.Text; } if(!String.IsNullOrEmpty(txtUserNickName.Text)) sql += " and USER_NICK_NAME = " + txtUserNickName.Text; } if(!String.IsNullOrEmpty(txtBirthday.Text)) sql += " and BIRTHDAY = " + txtBirthday.Text; } 1.2.3.4.5.6.7.8.9.10.
