Wildcards in MS Access SQL
I've written this SQL query in MS Access:
SELECT *
FROM Students
WHERE name like '_a*'
Which produces no r开发者_运维问答esults, even though I have names like danny and sara in the Students table. THe '_' wildcard doesn't seem to work.
BTW,
like '*a*'
does return all names with a in them.
And ideas?
In Access query builder's dialect of sql, you need ? not _. If you connect to the same mdb backend via odbc you'll need to go back to using the standard wildcards.
See this page for details.
精彩评论