mySQL: SELECT 参考另一个 table w/o JOIN
mySQL: SELECT with reference to another table w/o JOIN
在 MS Access 中我有一个类似
的查询
SELECT t1.*
FROM t1, t2
WHERE (((t1.c1) Like t2.c1));
在 t1.c1 中我有 e。 g.
"head of marketing"
"head of sales"
"software developer"
...
在 t2.c1 中我有 e。 g.
" 'asterisk' head of 'asterisk' " (with "*" as placeholders in front and after the search term).
当我运行得到的查询
"head of marketing"
"head of sales"
因此它工作正常。
我从 MS Access 切换到 mySQL。该语句没有 return 结果 - 只有完全匹配。
如何在本机 mySQL 中重现 SQL 语句?
服务器版本:5.6.32-78.1-log
Protokoll 版本:10
Access 中的星号似乎是通配符。
在包括 MySQL 在内的大多数 SQL 方言中,通配符是“%”以匹配字符序列,而不是 *
在 MS Access 中我有一个类似
的查询SELECT t1.*
FROM t1, t2
WHERE (((t1.c1) Like t2.c1));
在 t1.c1 中我有 e。 g.
"head of marketing"
"head of sales"
"software developer"
...
在 t2.c1 中我有 e。 g.
" 'asterisk' head of 'asterisk' " (with "*" as placeholders in front and after the search term).
当我运行得到的查询
"head of marketing"
"head of sales"
因此它工作正常。
我从 MS Access 切换到 mySQL。该语句没有 return 结果 - 只有完全匹配。
如何在本机 mySQL 中重现 SQL 语句?
服务器版本:5.6.32-78.1-log Protokoll 版本:10
Access 中的星号似乎是通配符。
在包括 MySQL 在内的大多数 SQL 方言中,通配符是“%”以匹配字符序列,而不是 *