sql模糊查找? 例如,有table如下列:name,address, telephone等等,我想从table表中模糊查找信息,输入框(edit1)输入的有可能是name列的关键字,或telephone列的关键字,怎么写两列的模糊查找呢?我这样写可以吗?select name,address,telephone from table where name like '%'+edit1+'%' and telephone like '%'+edit1+'%' 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 噢,错了应该是or而不是andselect name,address,telephone from table where name like '%'+edit1+'%' or telephone like '%'+edit1+'%' 加几个引号:select name,address,telephone from table where name like ''%'+edit1+'%'' and telephone like ''%'+edit1+'%'' '; 呵呵select name,address,telephone from table where name like ''%'+edit1+'%'' or telephone like ''%'+edit1+'%'' '; select name,address,telephone from table where name like '+#39+'%'+trim(edit1.txt)+'%'+#39+' or telephone like '+#39+'%'+trim(edit1.txt)+'%'+#39 关于DLL参数的问题 100分求表的关联.谢了. 关于生成图片问题 如何将一个数据集的数据移到另一个数据集中 这样的员工,应该不应该劝其离职? 终于找到工作了,可惜不能用我最喜欢的Delphi了 有谁知道在intraweb中的iwdbcombox的用法吗?高分向求 到底三层数据库中怎么向数据库添加数据啊?我用clientdataset.commandtext:='insert.... ';clientdataset.excute;但系统说在数据集打开时 巨菜的问题! 是不是联想机的串口都有问题? edit的格式控制问题 请教大家一个数据集过滤的问题
错了
应该是or而不是and
select name,address,telephone from table where name like '%'+edit1+'%' or telephone like '%'+edit1+'%'
select name,address,telephone from table where name like ''%'+edit1+'%'' and telephone like ''%'+edit1+'%'' ';
select name,address,telephone from table where name like ''%'+edit1+'%'' or telephone like ''%'+edit1+'%'' ';