日期:2014-05-19  浏览次数:20338 次

数据库查询
有3个文本框(用户名、电话、地址),对应数据表RelaTable中字段(name,   phone,   address),现在要做个查询,这3个文本框中不定输入1~3个,想问一下这个Select语句该怎么写。如果看不明白的可以上:http://61.171.98.214:8080/MasterJSP/SelectTest/select.jsp。我5/16   23:15之前都在

------解决方案--------------------
--try


select * from RelaTable
where name=isnull(@name,name) and phone=isnull(@phone,phone) and address=isnull(@address,address)