为什么这条语句查出来的结果会是空的呢?
但是实际上数据库中是有记录的
请问语句是哪有问题呢?
语句如下:select * from test_customer where title like '%汽配%'

解决方案 »

  1.   

    没看出有什么问题,
    这是2000数据库中,查询Northwind数据库,没问题
    select * from employees where title like '%Pre%'
      

  2.   

    select * from test_customer where charindex('汽配',title)>0这个有结果吗
      

  3.   

    --注意红字部分。
    select * from test_customer where title like N'%汽配%'
      

  4.   

    这是在ACCESS数据库中。数据中包含“汽配”的数据很多,不存在数据的问题。楼上的
    加了“N”之后提示报错啊~!
      

  5.   

    我知道了 
    如果是在ACCESS程序本身中执行用*替换%, 如果是在ADO中才用% select * from test_customer where title like '*汽配*'
      

  6.   

    如果是在ACCESS程序本身中执行用*, 如果是在ADO中才用%