日期:2014-05-17  浏览次数:20429 次

ACCESS 模糊查询
sql = "select top " + pagesize + " * from (select top " + number + " * from SmallProduct where SmallProductKeyWords like '*" + keywords + "*' order by SID asc) order by SID desc";


这是我写的 查出来的结果不对 ,明明是空的,怎么还能有结果 ,各位帮看看吧

------解决方案--------------------
sql = "select top " + pagesize + " * from (select top " + number + " * from SmallProduct where SmallProductKeyWords like '%" + keywords + "%' order by SID asc) order by SID desc";

*只能用作access里面,程序查询要使用%