select * from SomeTable where somefield like '%matchword%'

解决方案 »

  1.   

    精确匹配:
    select * from SomeTable where somefield = 'matchword'模糊匹配:
    select * from SomeTable where somefield like '%matchword%'
      

  2.   

    http://expert.csdn.net/Expert/topic/2892/2892288.xml?temp=2.895534E-03
      

  3.   

    select * from SomeTable where somefield like 'matchword%'
    select * from SomeTable where somefield like '%matchword'
      

  4.   

    sqlstr="select * from SomeTable where somefield like '%" + 变量 + "'%"