SQL Access 中的通配符:“%”和“_”不起作用

SQL Wildcard in Access: "%" and "_" don't works

我在 Access 的 Where 语句中尝试了一些通配符,但它们不起作用。例如:
此查询 SELECT staff.* FROM staff;returns:

我尝试使用通配符进行查询 SELECT staff.* FROM staff WHERE (staff.s_name LIKE "A%"); 但它 returns 是空的 table:

这是什么原因?我的通配符不起作用

(s_name是第二列)

(看"firstname"是"s_name"的标签,只针对视图)

Access 中的通配符是 *,而不是 %,这与 SQL Server 中的不同。

详情见MSDN

不不不,使用'*',而不是'%'。或者,使用 'Like'.

http://www.techrepublic.com/article/10-tips-for-using-wildcard-characters-in-microsoft-access-criteria-expressions/

https://www.techonthenet.com/access/queries/like.php

https://www.techonthenet.com/access/queries/like2007.php

例如:

喜欢'm*' 结果:所有以 m

开头的值

喜欢'm' 结果:所有包含 m

的值

喜欢'*m' 结果:所有以 m

结尾的值