擅长:python、mysql、java
<p>可以使用<code>%</code>通配符找到部分匹配。以您的例子:</p>
<pre><code>conn = sqlite3.connect('CheapestDestinations.db') c = conn.cursor()
c.execute("select FinalDestinations_table.CountryName, advisory_table.Country
\ FROM FinalDestinations_table JOIN advisory_table
\ WHERE FinalDestinations_table.CountryName like '%' || advisory_table.Country || '%'") c.fetchall()
</code></pre>
<p>此更改将{<cd2>}与包含该文本的{<cd3>}中的国家匹配;e、 g.“缅甸”将与“缅甸”、“缅甸”和“另一个缅甸名称”匹配</p>
<p>有关更多示例和用法,请参见<a href="https://www.sqlitetutorial.net/sqlite-like/" rel="nofollow noreferrer">this link</a></p>