select * from databasename where fieldname like '*XX*'
但在SQL SERVER 里是用%表示零個或多個字符
二、如何在ACCESS查詢datetime類型字段的日期范圍數(shù)據(jù)
如果字段是時間/日期型,你在進行類似這樣的執(zhí)行 select * from [card] where [datetime] = '2006-09-20' and [datetime]>='2006-09-01' 在ACCESS中會報錯,應該在日期型字段前面加上“#”即: select * from [card] where [datetime] = #2006-09-20# and [datetime]>=#2006-09-01#